• 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.

[Trigger] Curious, Maze System

Status
Not open for further replies.
Level 12
Joined
Aug 20, 2007
Messages
866
I was wondering if instead of adding insanely large amounts of regions for maze maps, you could add the players units to a unit group, create a .01 timer event and check if the pos of unit is on the terrain of the path != true???

I'm sure that would be easier than making all those regions :thumbs_up:

If you need an example of what I'm talking about I could make it
 
Level 3
Joined
Oct 23, 2007
Messages
36
I would assume that you would be making the allowed path one terrain type, and the bad path a different terrain type. If so that sounds plausible to me.
 
periodic timer (NOT .01 seconds) maybe like .20 seconds, a pick every unit owned by player (the computer that the maze units would be gone to) = false, an if then else function inside, If terrain type at position of picked unit = (what ever terrain you want to kill the unit) then kill picked unit, else (leave blank)

then remove the leak with custom script : "set bj_wantDestroyGroup = true" (no "")

put that custom script before the Pick every unit action.
 
Level 12
Joined
Aug 20, 2007
Messages
866
Hmmm, yeah .2 would be a hell of alot more efficient, although you could do the unit group better

Make it pick every and the matching condition is it's on the bad terrain + its not equal to neutral hostile (or whatever the bad unit controller is)

Then do Kill(picked Unit)

(with the bj_destroy, of course)

That would be alot less laggy, it would never pick any units(unless they are on the bad terrain), and the if/then would be a boolexpr (*i think*), which in my experience is much faster than if/thens (I could be wrong!!!, but certain triggs I've worked with made it seem as if it was)

Wow, haha that must make the mappers who made all those regions feel pretty dumb >< :xxd: (although most maze maps were done before the FT WE, so they didn't have a choice, so for those people I take it back)
 
Level 12
Joined
Aug 20, 2007
Messages
866
Hmmm

Point taken, although I usually work with movement triggs in the spells I make, and if there is more than 5+ moving in periodic (.01) then it can lag, but .2 shouldn't lag at all
(this is an extremely tiny code anyways)

I still try to use boolexprs as much as I can if using GUI, I'm pretty sure the unit group uses boolexprs to check for conditions, much faster than if/thens

Thanks for the help :wthumbsup:
 
Status
Not open for further replies.
Top