New to the forum? Say hello in this topic! Make sure to read the rules.

No command performed by triggering PlayerCommandTrigger at startup

Did you encounter a problem, exploit, glitch or bug while playing the game or running the dedicated server software? Tell us about it here.
Forum rules
By using the forum you agree to the following rules. For this forum you also need to follow these additional rules.
Post Reply
User avatar
JakSparro98
Superfighter
Superfighter
Posts: 311
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 19

No command performed by triggering PlayerCommandTrigger at startup

Post by JakSparro98 » Sat Apr 14, 2018 6:42 pm

First case

If a PlayerSpawnTrigger has an ID greater then the PlayerCommandTrigger, no actions will be triggered if the PlayerCommand trigger is triggered on startup.

Second case

PlayerCommandTrigger has an ID greater than PlayerSpawnTrigger (in a few words they works) but if one of this two tiles are changed of arrangement (rendering depth on the same layer or even on two different layers) they won't be triggered anymore.

Example map
0 x

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1003
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 28

Post by Gurt » Sat Apr 14, 2018 8:17 pm

Haven't looked at the map but based on the description the order in which triggers are triggered on startup is not guaranteed - it depends.
If you need a sequence of triggers being triggered in a specific order - like A, B and last C then you must let A trigger B and let B trigger C. Only A must be set to activate on startup. If all triggers activate on startup you may get one of the following orders: ABC, ACB, BAC, BCA, CAB, CBA. If trigger B is dependent upon trigger A then you can not let both A and B activate on startup as the order in which they activate are undefined/random from a map makers point of view.
Hope that makes some sense.
0 x
Gurt

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 311
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 19

Post by JakSparro98 » Sat Apr 14, 2018 9:16 pm

Gurt wrote:
Sat Apr 14, 2018 8:17 pm
Haven't looked at the map but based on the description the order in which triggers are triggered on startup is not guaranteed - it depends.
If you need a sequence of triggers being triggered in a specific order - like A, B and last C then you must let A trigger B and let B trigger C. Only A must be set to activate on startup. If all triggers activate on startup you may get one of the following orders: ABC, ACB, BAC, BCA, CAB, CBA. If trigger B is dependent upon trigger A then you can not let both A and B activate on startup as the order in which they activate are undefined/random from a map makers point of view.
Hope that makes some sense.
This is perfectly what I was aware, some years ago I experimented that "race condition-like" issue, but this is a bit different.

I assume that game tiles are spawned in progressive order from 0 to the last generated ID and when a PlayerCommandTrigger with ID 2 is spawned it is immediately triggered if the startup option is set to true and let's say that his target was a PlayerSpawnTrigger with ID 13, this will result in a ghost action since the tile with ID 13 was not spawned yet (or at least this is what it seems).
Same problem when PlayerSpawnTrigger and PlayerCommandTrigger are on a different layer/ different render depth, the command is not performed at all, it's not a race condition effect.

I want to make notice that this is only related to the PlayerCommandTrigger and maybe other player related triggers, all other trigger are normally triggered regardless their triggering order.
0 x

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest