• 0

    posted a message on Attach new event to trigger

    @Bibendus: Go

    You'll have to drop down to galaxy code for this one, I think. Call the following with a custom code block:

    TriggerAddEventUnitRegion(lv_trigger, lv_unit, lv_region, true)
    

    This assumes that you've previously defined three variables prior to calling the method: trigger, unit and region which point to the values you want to track

    Posted in: Miscellaneous Development
  • 0

    posted a message on Map Editor MATH calculation INCORRECTLY
    Quote from shaotang: Go

    @Nevir27: Go 

    Oh. I think I got what you mean. I will give it a try.. 

    edit:  it doesn't work. the thing is that speed of one beat is calculated by the editor, with a given music speed in real number, which is calculated incorrectly.. 

    by the way... isn't the (Current time - Last Tick) of the timer always the same?

    Ahh yeah, I didn't quite think it through - check out my very rough test map on how to grab the beat offset of the current beat (basically, split it apart)

    Since you can't rely on hitting the beat dead on, you need a reliable way of calculating the next fraction of a beat you want to hit.

    One way to cheat the system here would be to actually switch over to integers.  Say you know that the fastest your arrows hit is 1/8th of a beat.  Calculate the "beat fraction" similarly to how I calc "beat num" in the attached map, except you'd multiply BPS by your fraction - in this case: 0.0625.

    So beat fraction 0 would be the first beat, beat fraction 8 would be the second 16 would be the third and so on.  Then just figure out the next fraction you want to spawn on, and do so when you reach/pass that value.

    Note that you might see cases where you hit the same beat fraction twice - you'll likely want to keep track of whether you spawned as well.

    The main problem with your map's method is that each calculation is slightly off, so you're accumulating rounding errors.  If you calculate the beat each time, you're vastly reducing the number of rounding errors

    Posted in: Miscellaneous Development
  • 0

    posted a message on Item that adds ability

    I'm stumped on this one as well. There don't appear to be any triggers nor behaviors/effects/whatnot that add an ability to a unit. There's lots of ways to enable/disable one, but that's the best it seems you can do.

    How are folks doing maps where you have a hero that can pick and choose abilities? Give the hero unit all possible abilities and enable/disable them? Not entirely flexible :-/

    Posted in: Miscellaneous Development
  • 0

    posted a message on Map Editor MATH calculation INCORRECTLY

    @shaotang: Go

    Try creating a one shot timer that lasts some super long time (say, 524288) of real seconds. Have a second variable that tracks the "last tick" of the timer.

    Have a trigger that repeats relatively quickly (enough to fire close enough to your spawn times without fail - so likely 0.0625 or whatever triggers cap out at). That trigger should grab the current time, stuff it in a var, compare it to the stored "last tick" value for the elapsed time. Once the calculated elapsed time is >= your beat (or however often), spawn your arrows and store the saved current time as your last tick time.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Map Editor MATH calculation INCORRECTLY
    Quote from tordecybombo: Go

    The evil of floating point errors :(

    four significant digits for the input? o.O

    Posted in: Miscellaneous Development
  • 0

    posted a message on Attach new event to trigger

    I can't answer your question directly - but have you tried behavior/effect based collision detection? There's a great example map on this thread:

    http://forums.sc2mapster.com/development/map-development/397-making-a-rocket-launcher-missile-that-collides-with/

    Posted in: Miscellaneous Development
  • 0

    posted a message on Add same weapon to unit twice? (Now: How to make triggered effects persistent?)

    If you look at the Colossus as well - it achieves this by creating a Set type effect that manages multiple Launch Missile effects (one per launch/attach point)

    If you just want the missiles firing from the same location of the unit, create a set, and give it the launch effect as many times as you want missiles launching. Then tweak the weapon to fire the set effect instead of the individual launch effect

    Posted in: Miscellaneous Development
  • 0

    posted a message on Save/Load feature security?
    Quote from Xolsom: Go

    One word. Encryption. (Basically you would want to save everything as an encrypted string.)

    How would encryption solve this aside from severely obfuscating the string or data bank? The key you use to encrypt the data is either embedded in your map or generated off of some user-accessible data available every time a given player loads the map. The player just needs to find the algorithm and key in order to reverse it.

    Certainly raises the bar for cracking load/save systems, but nothing foolproof.

    Quote from HexenLord: Go

    Thats fairly easily avoided though. If a map has hundreds of incoming banks per second, they can just blacklist the IP address they are coming from (which will be the game host).

    Technically someone could make a map that purposely bombards the servers with banks, and Blizzard knows that. Just another reason I doubt they will host banks on their servers.

    If they end up storing the banks server side, I bet it's only saved when you exit the map (and cached in memory/on disk in the meantime)

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