• 0

    posted a message on Revert trigger editor

    Ctrl+D

    Posted in: Miscellaneous Development
  • 0

    posted a message on Beams and Triggers

    http://forums.sc2mapster.com/development/map-development/3657-beam-sfx-using-triggers/

    If you've found a way to create beam actors with triggers that would be superb.

    If not... creating effects to get beams won't help you very much, there is no way to store them and no way to modify them using triggers.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Random Spawn

    To make things easier, you can use this chance function I just made.

    chance(chance, outOf)
    chance(20, 100) would be 20%
    chance(20, 1000) would be 2%
    chance(1, 2) would be 50%

    Posted in: Miscellaneous Development
  • 0

    posted a message on Help with - Water Height -

    You're probably editing a different water type or state than the one you placed.
    When you edit a water type all water will be displayed with that type so you have visual feedback, after the edit the water will revert to the one that was placed.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Changing the color of water

    Like zelda said, you need to create a new state for your water type, then switch to that state using the WaterSetState() function.
    Can't switch between water and lava.

    Example map.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Counting trigger runs?

    TriggerGetExecCount()

    Do note that, if you use this function inside the trigger that you're checking, the value you'll get will be the actual value -1 because it increments after the trigger has executed.

    Posted in: Miscellaneous Development
  • 0

    posted a message on the behavior checker trigger : i can'T make it check every unit

    Not enough info.

    We need to know what you're trying to do, what you've got so far and what the problem is.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Need Trigger Help :D

    When listening for the TriggerAddEventUnitConstructProgress(...) event, EventUnit() returns the unit that built the structure, you can use EventUnitProgressUnit() to get the structure that was built.

    http://img838.imageshack.us/img838/842/hddconstructprogressuni.jpg

    Posted in: Miscellaneous Development
  • 0

    posted a message on Custom Condition problem (return true if unit is in unit group, otherwise return false)

    Hi goof (what an appropriate name for this situation :P )

    The condition you're trying to make is already built into the editor, you just add a comparison condition and see if "Unit in Unit Group" == true.

    Now, if you're just making it to learn more about conditions, there's a lot of problems with your logic.
    The reason it's giving you an error is because all your return statements are inside the loop and so, if the unit group is empty the loop will never run and the condition won't return anything.

    Also, for any future scripting you might do, try to check conditions only once if the data you're checking will never change. There is no reason to check if the group is empty for every unit inside the group. You don't even need to check if the group is empty in this case because if the group is empty the loop won't run.

    I've attached a map with the proper way to make this condition, I suppose it's just as fast as the built in condition since there is no faster way to check if something contains something else except by checking all the elements. You can run the map and see that it works perfectly.

    http://img688.imageshack.us/img688/427/hddcustomconditionexamp.jpg

    Posted in: Miscellaneous Development
  • 0

    posted a message on random game time?

    http://a.imageshack.us/img51/600/ticktockinsane.jpg

    Posted in: Miscellaneous Development
  • 0

    posted a message on "Ignore Terrain Height" works in editor, not in game

    The ignore terrain height flag is bugged, I just hope the devs know about it or someone posts on the blizz forums because I can not.

    When you set the flag to on it does absolutely nothing.
    When the unit moves at all, ignore terrain height will take effect and the unit will go underground.
    If you move the unit with triggers (Move unit Instantly..) the unit's height will reset to 0 (or default).

    I developed a physics system that I was going to use for a map, but I noticed that I can't make units smoothly go over cliffs because cliff edges would push them up and down rapidly. So the only way to make a ground unit smoothly go over a cliff would be to make it ignore the terrain. Unfortunately... like I said, moving a unit with the flag set to on resets the unit's height.

    Until it's fixed, you could try making a unit instead of a structure, set the flag to on and order the unit to move slightly.
    Good luck.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Event How To: "If a change has occurred" ?

    @ShadowLightX: Go

    It would be awesome if you could read the post you're replying to next time.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Beam SFX Using Triggers

    From what I can see, the Game Link - Effect type stores an effect type, not an instance of an effect, so it still leads nowhere. Even if we would be able to store effects it wouldn't matter, since there are no functions in the editor to get the last created effect (effect created through triggers) and no actions to delete an individual effect.

    There HAS to be a way to create beam actors directly with triggers, effects seem to be the perfect solution for "one shot" types of abilities. Making beams directly with actors would offer so much flexibility.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Beam SFX Using Triggers

    I'm also curious about this.

    Warcraft 3 had a lighting type we could use. We could create beams and store them in variables.

    It sounds simple when s3rius explains it but I've run into a lot of problems. Once you create the effect there is no way to store it in a variable for future reference (there is no Effect type), so I can not delete individual beams, only beams in range of a point.

    Also, there is no way to create an effect from a point to another point, only from a unit to a point. So the beam will move if the unit moves. And you can not create any beams unless you have some units in place.

    There is also no way to modify the properties of an effect with triggers, so the beam will always look the same until you delete it.

    If anyone can prove me wrong please do, I would be very happy to hear that I'm full of shit. One of the maps in the campaign preview had a giant laser that would stop firing once it did it's job but I suspect it was achieved by ordering the source unit to stop attacking.

    I hope someone knows a way to create beam actors with triggers, since they could be stored in variables and be modified by sending actor messages. The "Create Actor" action has 3 content parameters but I haven't figured out how to use them. Otherwise beams will see very limited use. Being forced to create beams through effects would make one of my maps impossible to create.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Event How To: "If a change has occurred" ?

    How are you changing the unit's owner ?

    I haven't messed around with ownership too much but I don't remember any way to change the owner of a unit except with triggers.

    If you're using triggers to change the owner of a unit I don't see why you would need to detect when it happens since you're the one who is making it happen in the first place. So you just do whatever you need to do after changing the owner.

    I you're somehow changing the owner some other way, and there is no event to detect this action; the only way to check for it would be to use a periodic timer that checks the owner and stores the result in a variable, if the owner does not equal the stored variable, the owner has changed.

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