• 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] What's wrong here?

Status
Not open for further replies.
Level 3
Joined
Sep 3, 2004
Messages
50
JASS:
call TriggerRemoveAction( gg_trg_Damage_Functions, GetTriggerUnit(), EVENT_UNIT_DAMAGED)

I'm using gui triggers but I have a custom script action with this. What I'm trying to do is have an event removed of a unit getting damaged (which was an event created from another trigger). This custom script is in the same trigger in which the event is to be removed (not sure if that has any relevance though). I'm pretty sure the problem is mostly with how I tried to do this (or perhaps it is the wrong kind of function) so I think no more detail will be needed for someone to solve this problem, but more could be provided if necessary.
 
Level 11
Joined
Jul 12, 2005
Messages
764
umm... Now what do you want? To remove the actions from the trigger, or to remove the event?
JASS:
native TriggerRemoveAction  takes trigger whichTrigger, triggeraction whichAction returns nothing
Your code should be sthg like this:
JASS:
call TriggerRemoveAction( gg_trg_Damage_Functions, Trig_Damage_Functions_Actions)

Hey, a question: Can events be deleted/removed? I couldn't find such function...
 
Level 3
Joined
Sep 3, 2004
Messages
50
PurplePoot said:
it should be

function Trig_Damage_Functions_Actions

,not just

Trig_Damage_Functions_Actions

Now the errors have been multiplied by 3...

"Line 81: Invalid argument type (unknown type)"
"Line 106: Expected 'endif' (unknown type)"
"Line 108: Expected 'endif' (unknown type)"

and the custom script is Line 80, everything else is gui...
 
Level 3
Joined
Sep 3, 2004
Messages
50
Attempts are appreciated, though my problem remains unsolved...

Surely someone knows how to remove events...anyone?
 
Level 5
Joined
May 22, 2006
Messages
150
JASS:
call TriggerRemoveAction( <Trigger Variable> ,function <Name of Action> )

This works with a global trigger and it's action.
(just tested it)

If not, the fault has to be elsewhere.
 
Level 3
Joined
Sep 3, 2004
Messages
50
LordZsar1 said:
JASS:
call TriggerRemoveAction( <Trigger Variable> ,function <Name of Action> )

This works with a global trigger and it's action.
(just tested it)

If not, the fault has to be elsewhere.

Is this right?

JASS:
call TriggerRemoveAction( gg_trg_Damage_Functions, Function GetTriggerUnit(), EVENT_UNIT_DAMAGED )

Says "Expected a name" on it.
 
Level 3
Joined
Sep 3, 2004
Messages
50
PurplePoot said:
dont think you can, without completely resetting the trigger.

You can create events with triggers but can't remove them? How annoying..

Well how do you "reset" a trigger?
 
Level 3
Joined
Sep 3, 2004
Messages
50
PurplePoot said:
JASS:
native ResetTrigger takes trigger whichTrigger returns nothing

:p

What exactly does that do? One thing is for sure, it is not removing the events that were created from another trigger as you said it would....
 
Level 3
Joined
Sep 3, 2004
Messages
50
PurplePoot said:
oops, didnt noitce that :?

Your information was actually more useful since it gave details as to how to do it...

I'm not too knowledgeable in JASS right now (hence, my usage of gui over JASS) so what he said really didn't mean much of anything to me at the time.

Not really important, but I thought I'd just point that out :lol:
 
Status
Not open for further replies.
Top