HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Enter a building trigger

06-03-2006, 01:08 PM#1
AtOmIc_PeAnUt
Hi all, sorry for all my noobish questions But this time I was looking for a bit of triggering which involves entering and exiting a building via just 2 circles of power (one inside, one outside) and when you enter the one outside, you jump to the one inside, and vice versa. I know how to do it as it's pretty simple, but what I don't know how to do is to prevent it from just sending you back and forth from inside to outside and trap you in a never ending loop. I tried a way with some variables, a booleon which sets to true when you are inside after you jump to the circle, then only lets you go outside if it is true. My theory was that on the point you enter the circle inside, the boolean will be flase, only setting to true a second later, therefore not sending you back outside straight away, leaving it up to you to leave the circle then enter it again to get out. However, this seemed to just freeze the whole thing everytime I tried to enter the building So any suggestions? lol
06-03-2006, 01:39 PM#2
Captain Griffen
You move them to a location outside the region, or you use some conditions, or you turn off the entering trigger when you move the unit out, and vice versa.
06-03-2006, 01:43 PM#3
AtOmIc_PeAnUt
Yes that's what I have at the min, but I thought it looks quite noobish and messy moving them to a place outside the circle, I also need to leave it open for more than one player to be able to be in the building at once though, do you know how I could do it by turning tirggers on and off?
06-04-2006, 07:41 PM#4
Thunder_Eye
turn of the trigger that fires when you enter the region you move the unit to, then have a wait and turn it off again.
You should be able to figure it out
06-04-2006, 08:31 PM#5
BertTheJasser
The follownig 2 lines make it a generic "portal" with all it's order keeping things and so on.
I really like that 2 functions.
Collapse JASS:
native WaygateSetDestination takes unit waygate, real x, real y returns nothing
native WaygateActivate takes unit waygate, boolean activate returns nothing
They should fit to your problem perfectly and should do the job.

It doesn't even require a single extra trigger =P
06-05-2006, 03:53 PM#6
AtOmIc_PeAnUt
OK, that JASS looks helpful but I suck at JASS, do I have to implement any specific unit names and stuff in?
06-05-2006, 03:57 PM#7
blu_da_noob
In GUI:
Trigger:
Neutral Building - Enable No unit
Neutral Building - Set No unit destination to (Center of (Playable map area))