![]() | |
| | #1 |
![]() Join Date: Feb 2007 Location: Paradise City
Posts: 618
![]() | Multiple Actions I'm looking for a way to put multiple "Enters Region" actions into one trigger, but not have them interfere with eachother. For example, I have a trigger that gives you an item after entering the region, but I also want to make it so that if a hero enters another region, it gives them gold. I just don't want to create triggers for each "Enters Region" action :P |
| | |
| | #2 |
![]() Join Date: Apr 2007
Posts: 2,436
![]() ![]() ![]() | Re: Multiple Actions i dont think i quite follow the question, but ill take a blind stab at it, just use a bunch of if then else statements for each region just make Event Unit enters region Condition Unit = heroguy Actions If region = region A Then give triggering unit gold if region = region B then kill unit and so on |
| | |
| | #3 |
![]() Join Date: Feb 2007 Location: Paradise City
Posts: 618
![]() | Re: Multiple Actions Ah, I figured it might need I/T/E, but I didn't think there was a Condition involving stuff about Regions, but I found them Thanks.Off-topic (sort of): If I create a special effect on units to indicate they have a quest, and you need to enter a region to get this quest, how do I destroy the special effect? Since the special effects are created at map initialization, I can't find a way to destroy it once a unit enters the region... I have this (btw, Quest_Effect[1] is the variable I used to track what special effect needs to be destroyed, it's at map initialization): Code: Destroy Effect
Events
Unit - A unit enters Secret Gold <gen>
Conditions
((Entering unit) is A Hero) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Hyrul Inner Fire <gen> contains (Entering unit)) Equal to True
Then - Actions
Special Effect - Destroy Quest_Effect[1]
Else - Actions Last edited by DarkBlade; 01-24-2008 at 01:24 PM. |
| | |
| | #4 |
![]() Join Date: Apr 2007
Posts: 2,436
![]() ![]() ![]() | Re: Multiple Actions i believe you want to save the special effect to a variable (of type special effect) when you create it at initialization, then destory the effect set to the variable when the guy enters the region or whatever |
| | |
| | #5 |
![]() Join Date: Feb 2007 Location: Paradise City
Posts: 618
![]() | Re: Multiple Actions Well, that didn't work until I replaced the "Secret Gold <gen>" with "Hyrul Inner Fire <gen>", but that makes it so I have to make a trigger for each special effect destroy :P Is there a way around this? |
| | |
| | #6 |
![]() Join Date: Apr 2007
Posts: 2,436
![]() ![]() ![]() | Re: Multiple Actions i dont follow... |
| | |
| | #7 | |
![]() Join Date: Feb 2008
Posts: 10
![]() | Re: Multiple Actions Quote:
Code: Destroy Effect
Events
Unit - A unit enters Secret Gold <gen>
Unit - A unit enters Hyrul Inner Fire <gen>
Conditions
((Entering unit) is A Hero) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Hyrul Inner Fire <gen> contains (Entering unit)) Equal to True
Then - Actions
Special Effect - Destroy Quest_Effect[1]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Secret Gold <gen> contains (Entering unit)) Equal to True
Then - Actions
Special Effect - Destroy Quest_Effect[2]
Else - Actions
... | |
| | |
| | #8 |
![]() Join Date: Feb 2007 Location: Paradise City
Posts: 618
![]() | Re: Multiple Actions I fixed this a long time ago. |
| | |
| | #9 |
![]() Join Date: Sep 2006 Location: Denmark (GMT+1)
Posts: 2,173
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Re: Multiple Actions Also don't nest those damn if/then/else actions. Use a loop if possible. |
| | |
| | #10 |
![]() Join Date: Feb 2008
Posts: 10
![]() | Re: Multiple Actions well **** ok darkblade |
| | |
| | #11 |
![]() Join Date: Dec 2006
Posts: 2,992
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Re: Multiple Actions Usually topics over 2 weeks old are solved. Which is why we allow bumps in The World Editor Help Zone. Like once every one or two weeks. Just for future reference. |
| | |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Commands on map | sebaudy | World Editor Help | 17 | 11-11-2007 11:34 PM |
| My game is crashing more and more often... | Aro2220 | World Editor Help | 27 | 11-03-2007 08:17 AM |
| Respawning + Hero Selection on Circle | DarkBlade | Tutorials | 4 | 09-07-2007 07:56 PM |
| Footmen? | StNicholas | World Editor Help | 13 | 01-12-2007 11:12 PM |