• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Ahhh!!!!Help trigger problem!!

Status
Not open for further replies.
Level 5
Joined
Sep 22, 2004
Messages
98
Ok i am working on a CTF and I forgot after I hadn't played the game for a while how make it where the hero returns to the other side and they get points and the flag is returned.

Now I how to work points and the leader board but I have trouble with trigger knowing that the unit has that Flag and I dont want it where i have to put in a specific slot.

Can anyone help!!??PLZ
 
Level 6
Joined
Mar 25, 2005
Messages
304
Heres one way that you might be able to do it. My editor isn't working so I'll give you a way that I'm pretty sure works:(Set up a variable called flag and make it integer)

Trigger 1 (Unit acquires flag)

Event:
*Unit acquires an Item
Condition:
*Item type of manipulated item equals flag
Action:
*If/Then/Else multiple function
*If:
Flag equals 0
Owner of the acquiring unit equals = (All the players in one team)
*Then: Set variable Flag = 1
*Else: Set variable Flag = 2

Trigger 2 (Unit drops, loses a flag)
Event:
*Unit drops an Item
Condition:
*Item type of manipulated item equals flag
Action:
*If/Then/Else multiple function
*If: Flag equals 1
*Then: Set variable Flag = 0
*Else: Do nothing

*If/Then/Else multiple function
*If: Flag equals 2
*Then: Set variable Flag = 0
*Else: Do nothing

Final Trigger:(Keepin track of who has the flag)
Event:
*Periodic Event - Every 1 second of game time
Condition:
*None
Actions:
*If/Then/Else multiple function
*If: Flag equals 1
*Then: (Give points to team 1 however you are going to do it)
*Else: Do nothing

*If/Then/Else multiple function
*If: Flag equals 2
*Then: (Give points to team 2 however you are going to do it)
*Else: Do nothing

I'm pretty sure those should work. At least it should be theoratically. Good luck
-Blue
 
Level 5
Joined
Sep 22, 2004
Messages
98
But when does the unit make it to the other flag and score the point

It seems like you made were if the unit drops it somewhere they get a point or something like that

ok what I want it to be some what like this

Event:
Unit enter region

Condition:
Triggering unit is a hero
Triggering Unit is owned by Team1(variable:player group
I HAVE A PROBLEM RIGHT HERE
WITH THE ITEM THAT IS CARRIED


Actions:
Move item
run update leaderboard
set points=#
game text you have scored for team 1

is this possible or what??

thnx for trying Blue dragon
 
Level 6
Joined
Mar 25, 2005
Messages
304
Ok. Got it. I think this should work. If you are having problems with the condition to show that the unit is carrying the item, do this:
1. Look under the condition Boolean Comparison
2. Search for Hero - Hero has an Item under boolean comparison
3. Select that and select the item for the flag.

Hope that helps. Good luck
-Blue
 
Status
Not open for further replies.
Top