Hello, I am creating a map and my triggers suddenly stopped working, when I run the game I get an error like this
Scri: Trigger Error in 'gt_SpawnP1_Func': Event response function 'EventUnit' has no matching event? Near line 223 in gt_SpawnP1_Func[] in MapScript.galaxy
I had something similar last night, the event Map Initialization stopped working in two of the maps I had modified on Sunday - the map behave as if the event command wasn't there. That struck me as an odd bug, but I solved it by simply deleting the event and putting it back.
Most likely your event is incompatible with a fiction call.
for example:
Event: Unit enters region A
Action: kill triggering unit
This works no issues.
Yours probably looks something like this:
Event: Map Initialization
Action: Kill triggering unit.
The question becomes, what is the triggering unit? no unit initialized the map to trigger the event which started the trigger... so when you use this you get the same error. you have to specify the unit more directly.
Pretty sure this is the problem. There is no unit to trigger the event because the event is an expired timer.
Unless I am missing something.
also
Quote:
Order (Last created unit)
can be a little hinky. You may want to define the unit instead of using "Last Created Unit", but that's just my opinion.
Rollback Post to RevisionRollBack
I am largely inactive, but I am still around. Feel free to poke me if you need some help, just be warned that I only really come back if I need help and/or if I'm posting a new map/library.
The thing is, those were never the problem, then one day one of my player's spawns never worked, so I fixed it an then the others stopped working, but I never changed them
Hello, I am creating a map and my triggers suddenly stopped working, when I run the game I get an error like this
Scri: Trigger Error in 'gt_SpawnP1_Func': Event response function 'EventUnit' has no matching event? Near line 223 in gt_SpawnP1_Func[] in MapScript.galaxy
How can I fix this?
@Darttagman: Go
Your likiely using a "triggering" reference incorrectly. You can paste the code in your post if you need someone to find the issue for you.
@Darttagman: Go
I had something similar last night, the event Map Initialization stopped working in two of the maps I had modified on Sunday - the map behave as if the event command wasn't there. That struck me as an odd bug, but I solved it by simply deleting the event and putting it back.
Most likely your event is incompatible with a fiction call.
for example:
Event: Unit enters region A
Action: kill triggering unit
This works no issues.
Yours probably looks something like this:
Event: Map Initialization
Action: Kill triggering unit.
The question becomes, what is the triggering unit? no unit initialized the map to trigger the event which started the trigger... so when you use this you get the same error. you have to specify the unit more directly.
@SoulTaker916: Go
What my thing is
Event: Timer Expires
Conditions: (Owner of (Triggering Unit)) == 1
Action: Unit- Order (Last created unit) to ( Attack Targeting P2) (Replace Existing Orders)
And the timer hasn't been messed with, it repeats every .1 seconds
@Darttagman: Go
Pretty sure this is the problem. There is no unit to trigger the event because the event is an expired timer.
Unless I am missing something.
also
can be a little hinky. You may want to define the unit instead of using "Last Created Unit", but that's just my opinion.
@Yaksmanofage: Go
The thing is, those were never the problem, then one day one of my player's spawns never worked, so I fixed it an then the others stopped working, but I never changed them
Pretty sure last created unit only works with create unit functions that are in the same trigger/function.
@MaskedImposter: Go
The thing is, it worked perfectly fine before, but why did it just suddenly stop working?