• 0

    posted a message on Terrain Designing

    I'm currently stuck because I want my map to have two distinct terrain halves (one terran, one protoss) and there's the black wall in the distance (unless farclip is set to an unreasonable number for slow PCs) so both colours have to go well with black and with any ambient lighting...

    Posted in: Miscellaneous Development
  • 0

    posted a message on Optimising the movement trigger

    Like everyone else, I use a 3D camera and WASD movement.

    I'm looking for some ideas to make it go faster, since this trigger is run a total of 1200 times per second across all players.

    I have: - Several separate triggers that set a bool[12] to true when you press the key and to false when you release it.

    - A trigger that:

    • Puts the booleans into a bitfield (0-31)
    • Executes a switch statement
    • Each switch option sets the destination point based on unit move/backpedal/turn/strafe speed (may be 0) and the destination angle based on turn speed (may be 0);
    • Then move unit to (point) facing (angle).

    I looked at another third person demo map and it seemed to use a giant stack of if(and(each of the four keypresses)) then triggers. Is this faster than the bitfield + switch approach? My way seems faster because the most common inputs are 'nothing' and 'only forward' which are 0 and 1 respectively, ending the switch statement early. But then I'm not a programmer.

    In War3 it was often said that you had to 'drop out of the GUI to optimise your code for speed' but what is it you can do in Galaxy that the GUI won't do?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Is sight radius capped?

    I was afraid of that. I already have a movement trigger running for each player in the game 100 times per second and I heard moving regions is heavy...

    Maybe I'll have to, but only 4 times per second or so. :(

    Posted in: Miscellaneous Development
  • 0

    posted a message on Is sight radius capped?

    I use a 3rd person view. I gave my unit a sight radius of 50 (it's a max size map) and there is still a receding black wall in front of my nose. Changing the fog of war in map options to 'none' doesn't prevent enemies from popping up when you're about to run into them, and the other alternative seems to be to reveal the entire map via trigger, which would make the game pointless.

    Why can't I just increase the sight radius and have the fog of war retreat at a longer distance?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Terrain Designing

    Watch the Discovery Channel on youtube.

    :P

    Posted in: Miscellaneous Development
  • 0

    posted a message on Why July 27th will be awesome [confirmed sc2 date]

    OMFG

    I'd already taken a week off work from 26-30 July because it was the only available week during which none of my colleagues with kids are on holiday.

    So this gives me 3 days of last minute changes to the map, 1 day of 'day one release' and 4 days of 'day two balance patches'. :)

    Posted in: General Chat
  • 0

    posted a message on [Trigger] Preserving items on death

    Okay, you may have noticed that heroes tend to drop their items on death even if 'drops on death' is turned off in the item data.

    To fix this:

    Make a trigger that goes off when a unit dies; condition: unit is [your hero]. Use the add region action to create a positive circular region with a size of 0.01 at the location of triggering unit. Then pick each unit in the region with unit type item, add them to a unit group variable (global array or local) and move each picked unit to some place in a corner of the map. (It may be hackish, but afaik there's no 'unit type group' so you will need to keep an example of each item on hand)

    Then use the wait action to sit out the revive time; after this, respawn the hero.* Then pick each unit in the unit group you just made and for each picked unit, spawn one unit type of picked unit into the hero's inventory and remove it. Finally empty out your unit group if it's a global array variable.

    For this to work, it is important that 'drops on death' is turned ON in the item data. If it is off, you may get the behaviour I experienced where everything works fine the first time and then the second time you die it leaves your items on the ground.

    • 'Triggering player' doesn't always survive a wait action. You will need to assign your triggering player a (local) variable before the wait and refer to him/her as said variable after the wait.
    Posted in: Tutorials
  • 0

    posted a message on Want to know what Blizzard is ACTUALLY releasing with SC2?

    The diamondback was the cobra, the hover tank with a railgun on it. So of course Blizzard replaced it with a buggy with a flamethrower. :(

    Posted in: General Chat
  • 0

    posted a message on [Resolved] Duplicated unit weapons

    There are two ways data can be linked in the Data tab. Copy with dependents will copy an object and all objects it refers to, not the objects that are referring to it. You can weed them out by not changing the name of the copied object, then entering the name in the filter box at the top. Then go through all of the relevant tabs and look for objects that are not doubled.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Making a rocket launcher (missile that collides with objects in its way)?

    I think you can do that if you look closely at the hellion shot. :) It actually does pretty much the same thing except for the detonation.

    Posted in: Miscellaneous Development
  • 0

    posted a message on How to detect when unit acquires/looses item?

    Yes, in an indirect way: try to detect when the item vanishes off the ground. :( It's a clumsy solution but what have you.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Help with ability

    Random damage seems hard with the data editor. You might as well switch to triggers at this point: when the ability is used, spawn a persistent effect on the target that does nothing (give it a duration and pay attention to Expire Effect), Move Region to target point and spawn x invisible units with some special flag (heroic?) or unusual flag combination in the region. Then when the persistent effect runs out and expires, have it spawn a search area effect that looks for all units in range that meet the criteria, then add them to a unit group. Also have a trigger that spawns an invisible shooter on the caster's location and tell it to 'Pick all units in unit group' and shoot them.

    That's how I'd do it in War3, but someone might be more clever than me.

    The graphics should look okay if you actually set an actor (actors listen to Events and those are absolutely not obvious; look at existing examples for your own sake). I haven't experimented much with missiles, but clone yamato where you can and only change the model and mover (to create an arc)

    Posted in: Miscellaneous Development
  • 0

    posted a message on Switching between command cards

    Omfg workers. :( And you're right. Somehow I thought it was like War3 where you had one 'build' ability. >_<

    Posted in: Miscellaneous Development
  • 0

    posted a message on Switching between command cards

    In a unit's command card field, there is an intriguing dropdown '1'-'4'. However, has anyone figured out yet how to actually switch between command cards in the game? :)

    Posted in: Miscellaneous Development
  • 0

    posted a message on Beam invisible, but only when

    I made an ability that creates a persistent effect on the target, which triggers damage 5 times. This results in 5 beams, which are based on the point defense drone attack.

    The weird thing is that from some angles (especially behind the camera) the beams are invisible. :( What gives?

    Posted in: Miscellaneous Development
  • To post a comment, please or register a new account.