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
Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.
New to the forum? Say hello in this topic! Also make sure to read the rules.
New to the forum? Say hello in this topic! Also make sure to read the rules.
No command performed by triggering PlayerCommandTrigger at startup
Forum rules
By using the forum you agree to the following rules. For this forum you also need to follow these additional rules.
By using the forum you agree to the following rules. For this forum you also need to follow these additional rules.
- JakSparro98
- Superfighter
- Posts: 530
- Joined: Fri Jul 15, 2016 7:56 pm
- Started SFD: PreAlpha 1.0.5
- Location: Rome, Italy
- Gender:
- Age: 25
- Gurt
- Lead Programmer
- Posts: 1884
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 34
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.
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
- JakSparro98
- Superfighter
- Posts: 530
- Joined: Fri Jul 15, 2016 7:56 pm
- Started SFD: PreAlpha 1.0.5
- Location: Rome, Italy
- Gender:
- Age: 25
This is perfectly what I was aware, some years ago I experimented that "race condition-like" issue, but this is a bit different.Gurt wrote: ↑Sat Apr 14, 2018 8:17 pmHaven'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.
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