• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Event: A Unit Enters.. (JASS requests)

Status
Not open for further replies.
Level 9
Joined
Oct 15, 2006
Messages
339
Terrain of type.

Is there any way to mod some JASS code to have a simple function such as

IF a unit enters 'Terrain of Type'

Terrain of Type equal to 'X'

Then do 'X'

I'd like to have all the bullshit and fat trimmed off and thrown out. I'm hoping that with JASS it's possible to do so. I'd be annoyed to have to use "every X seconds of game time" and/or rects.
Would make for a great (popular) code if it is possible. Would reduce lag and size of map.

And if it IS possible with JASS, but you don't know EXACTLY how, please post your ideas so the next JASSer can feed off of them until someone makes this; for the benefit of all.

Thanks.
 
Level 11
Joined
Feb 18, 2004
Messages
394
No, its not possible. Not in JASS, not in vJASS, not in magical fairy programing for dummies. (well, maybe...)

You would need a timer running a loop or you would need a rect over every terrain square on the map. Having a rect over every square of the map is insane. Use a timer. (somewhat equivalent to "every X seconds of game time")

The logic behind something such as this is piss simple. Its just iterating through an unit array or unit group in a repeating timer, checking the terrain at their current position and doing whatever it is you want done. It wouldn't be that processor expensive. (Unless you write it using the GUI...)
 
Level 9
Joined
Oct 15, 2006
Messages
339
hermm..

I thought of a different way.

((Position of (Triggering unit)) is blighted) Equal to True

of course it would take a little extra work, but replace the blight tile with one's own, or a default tile. Then you could still use the "every X seconds of game time" 'DO X' but without the rest of a hassle... Unless that IS a hassle.
haha

I'm going to be using an ice trigger so it really won't be a hassle for me.

You can hassle everything else but don't hassle the hoff!
 
Status
Not open for further replies.
Top