Bots trigger ENTER scripts but not PlayerEntered events

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Bots trigger ENTER scripts but not PlayerEntered events

Re: Bots trigger ENTER scripts but not PlayerEntered events

by Marisa the Magician » Wed Apr 10, 2019 1:23 pm

Yeah, that did the trick!

Re: Bots trigger ENTER scripts but not PlayerEntered events

by Rachael » Wed Apr 10, 2019 4:25 am

Does this fix it?

Re: Bots trigger ENTER scripts but not PlayerEntered events

by Marisa the Magician » Wed Apr 10, 2019 4:13 am

I noticed that this isn't 100% fixed. The PlayerEntered event is getting called for bots before their playerinfo has a mo attached. This... is kind of a problem.

Re: Bots trigger ENTER scripts but not PlayerEntered events

by Rachael » Sat Apr 06, 2019 6:15 am

Re: Bots trigger ENTER scripts but not PlayerEntered events

by Rachael » Sat Apr 06, 2019 5:59 am

Bots being added to the game is in fact a hack that is added in due to the fact that there is no actual late-join mechanism in the game. Fixing this would be as simple as adding the event to one of the lower-level calls that result from the "addbot" command after the bot definition is parsed and the bot is selected and before G_DoReborn().

Bots trigger ENTER scripts but not PlayerEntered events

by Marisa the Magician » Sat Apr 06, 2019 5:54 am

This probably is unimportant because, y'know, bots, but still...

Provided here is a tiny wad that prints when a player enters/respawns/dies/disconnects both through an event handler and through acs.

Here's a sample of what's happening: Everything works as expected EXCEPT PlayerEntered on ZScript doesn't get called for bots.

Code: Select all

MAP01 - Entryway

16 bots read from bots.cfg
[ZScript] Player Marisa entered.
[ACS] Player Marisa entered.
]addbot
V234 joined the game
[ACS] Player V234 entered.
You got the chaingun!
V234 was mowed down by Marisa's chaingun.
[ZScript] Player V234 died.
[ACS] Player V234 died.
[ZScript] Player V234 respawned.
[ACS] Player V234 respawned.
]removebots
[ZScript] Player V234 disconnected.
[ACS] Player V234 disconnected.
Removed all bots

Top