• All, Gmail is currently rejecting messages from my host. I have a ticket in process, but it may take some time to resolve. Until further notice, do NOT use Gmail for your accounts. You will be unable to receive confirmations and two factor messages to login.

"Wait" bugged when using with obstacles

O Ilusionista

Captain 80K
OpenBOR V3 - 6391 - Windows

I am having an weird behaviour with the "wait" on a specific stage:
If I add an enemy as Item on an obstacle (so the enemy will appear if you break the obstacle), it can bug or not depending of a condition:

- If you break the obstacle BEFORE killing the last enemy of the wait, everything is fine and the next WAIT will work
- But if you break the obstacle AFTER killing the last enemy of the wait, all the other Waits on the stage will get ignored and I can simply walk through all the stage

I can't let the enemy go offscreen because they will get killed instanly, but funny enough, as soon that enemy gets killed, the next Wait will trigger, no matter where I am


I am attaching the current stage here, but you can try for yourself on the last released version here: Pocket Dimensional Clash 2
The file is located here:
data/levels/2-militarhq/shadaloo-stg3.txt

Things that I tried:
- Changing the spawn of the enemy from a scripted spawn on the obstacle Death animation to a native "item" and the result is the same.
- Fixing the AT position of later enemies (which were spawned at 900 instead of 1000). No good.

#------------------------------------------------------- BOSS WAVE
Wait
at 1000

group 1 3
at 1000

spawn Grenadier
@script void main() {
performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW4"));
} @end_script
coords -140 175
aggression -1
at 900

spawn Grenadier
@script void main() {
performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW4"));
} @end_script
coords 620 175
aggression -1
3pspawn 1
at 900

- I tried to moved the capsules (which were spawned AT 0 to AT 50), no good.

Any ideas?
 

Attachments

Last edited:
Solution
OpenBOR V3 - 6391 - Windows

I am having an weird behaviour with the "wait" on a specific stage:
If I add an enemy as Item on an obstacle (so the enemy will appear if you break the obstacle), it can bug or not depending of a condition:

- If you break the obstacle BEFORE killing the last enemy of the wait, everything is fine and the next WAIT will work
- But if you break the obstacle AFTER killing the last enemy of the wait, all the other Waits on the stage will get ignored and I can simply walk through all the stage

I can't let the enemy go offscreen because they will get killed instanly, but funny enough, as soon that enemy gets killed, the next Wait will trigger, no matter where I am


I am attaching the...
@O Ilusionista

i have been having similar trouble,

you dont mind is this enemy is included in a group?

because i did accidentally made a way to spawn enemies that linger around and where independent of groups, waits or blockades did not affect them... only problem you will have is that these entities cant drop items, if you need them to dropt their items as ondeathsxcript spawns
 
scratch that Ilu...

i think that you can't have the wait and the groups at 1000 and your grenadiers spawn at 900.

but from the txt file you posted it seems you corrected it already...

anyway , the method is that you spawn an entity that has a very short life (like 1 or 2 centisencond long) before it dies it spawns another or random others, even if the engine wanted to count the entity on a group or whatever, it cant, because the spawner is dead and already accounted for...
 
Last edited:
i think that you can't have the wait and the groups at 1000 and your grenadiers spawn at 900.
Yes, as I mentioned above, I already fixed it but I get the same result.

anyway , if it is still bugging you, the method is that you spawn an entity that has a very short life before it dies it spawns another or random others
Ah its not that it "bugs" me, I am trying to pinpoint which seams to be an engine bug. So workarounds like that won't make sense, as we need to find what causes it and report to the devs. If there's one thing I've learned in life, it's that workarounds ALWAYS come back to haunt you in the future.
 
OpenBOR V3 - 6391 - Windows

I am having an weird behaviour with the "wait" on a specific stage:
If I add an enemy as Item on an obstacle (so the enemy will appear if you break the obstacle), it can bug or not depending of a condition:

- If you break the obstacle BEFORE killing the last enemy of the wait, everything is fine and the next WAIT will work
- But if you break the obstacle AFTER killing the last enemy of the wait, all the other Waits on the stage will get ignored and I can simply walk through all the stage

I can't let the enemy go offscreen because they will get killed instanly, but funny enough, as soon that enemy gets killed, the next Wait will trigger, no matter where I am


I am attaching the current stage here, but you can try for yourself on the last released version here: Pocket Dimensional Clash 2
The file is located here:


Things that I tried:
- Changing the spawn of the enemy from a scripted spawn on the obstacle Death animation to a native "item" and the result is the same.
- Fixing the AT position of later enemies (which were spawned at 900 instead of 1000). No good.



- I tried to moved the capsules (which were spawned AT 0 to AT 50), no good.

Any ideas?
Try to use "group 3 3" instead of "group 1 3", I did a quick test in your game and it worked fine.

It makes sense because groups like 1 3 can't be refilled with new enemies, it's a closed group of 3 entities that must be entirely killed in order to spawn any new entity. On the other hand, groups like 3 3 can be refilled constantly with new enemies because the engine will always try to maintain 3 enemies on the screen.

So, in theory the engine is doing it right, because once the capsule spawn happens before you reach a required "AT" to spawn a new group, it understands that the remaining entity belongs to the previous group and was not totally eliminated yet, causing it to not spawn anything until he is killed.

As a suggestion, if it's mandatory for players to break all the Capsule_Doll in order to advance, I suggest changing it to type enemy, this is the same trick I'm using in all elevators in the SORX (they are type enemy too).

 
Solution
Try to use "group 3 3" instead of "group 1 3", I did a quick test in your game and it worked fine.
yeah, it works! Thanks buddy

So, in theory the engine is doing it right, because once the capsule spawn happens before you reach a required "AT" to spawn a new group, it understands that the remaining entity belongs to the previous group and was not totally eliminated yet, causing it to not spawn anything until he is killed.
But this doesn't makes much sense. I would understand if if affects the next groups, but not the "waits".

As a suggestion, if it's mandatory for players to break all the Capsule_Doll in order to advance, I suggest changing it to type enemy, this is the same trick I'm using in all elevators in the SORX (they are type enemy too).
ah, they aren't mandatory. Players can break them or not, its up to them. Some will grant you itens, some will give you enemies.
 
I would understand if if affects the next groups, but not the "waits"
I understand, and certainly it's a thing that should be improved on the source. But it's comprehensive because for us, waits, spawns and groups are different things but for the engine internally they are all treated equally as level requests.

Maybe the original author developed the source code to skip any new request if there's a remaining entity instead of filtering it and just skip new groups. So, using this logic, it will skip anything in the level file including "waits" too.

I will check the source to understand better and think of a future improvement.
 
Back
Top Bottom