creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
C2 Extra events (numbers 16-29)   
dingus

dingus
Australia  


  11/21/2020  1

Hello. First post to the dev forum. Forgive me if this isn't the correct place.

Lately I've been tinkering with the simplest of objects in an attempt to better understand the engine's event prioritisation, pre-emption and routing.

I've discovered a curious behaviour that makes no sense without an insight into the problem it was intended to solve. Maybe you've gained that insight and will share it with us.

If an object has a handler for Extra Activate 1 (EA1), the Activate 1 (A1) handler is never invoked. I won't bore you with the details but I've conducted sufficient experiments to be certain this is not a random glitch.

It's possible that there's some precondition, that I've not yet met, that is preventing A1 from being invoked. I have determined that the object is NOT active at the moment the A1 event is triggered (i.e. actv == 0).

I have tried explicitly triggering A1 from within the EA1 handler. There's no evidence that the A1 handler is ever invoked. I've modified the same line of CAOS in the EA1 handler to trigger a user-defined event (UDE). That UDE handler is invoked as expected.

I can't yet say whether this apparent "suppression" is evident in other Extra non-extra Event pairs but I plan to explore that possibility.

Has anyone else observed this behaviour? What purpose does it serve?

Please share your knowledge (or speculations).

dingus

 
dingus

dingus



  11/29/2020  1

A couple of fresh gobbets for those following along at home.

The (vanilla) Eden Scriptorium contains wildcard Extra Activate [12] handlers:
scrp 0 0 0 17

scrp 0 0 0 18

I suspect they are the default handlers that are invoked if an object doesn't define its own. Does anyone know whether this is true? If noone can say for sure I'll hack in some BBLEs and then we'll know.

After my last post I had an epiphany. I'd made a newb mistake when attempting to trigger A1 from within the EA1 handler. The first dozen message numbers used in calls to MESG WRIT and MESG WRT+ are not Event numbers. Consequently I was sending Message 1 which was triggering A2 (and my test object had no A2 handler).

After changing my code to use Message 0, I was able to fire A1 from within EA1.

The wildcard EA1 and EA2 handlers in the Scriptorium that do this too. Which kinda suggests that this is the way it should be done.

dingus


 
bedalton

bedalton



  1/5/2021

I have had this problem in C1 as well. In the C1 scriptorium, I believe all or at least most extra scripts, manually call the event script on the object. So for an extra activate 1 script, it calls
mesg writ _it_ 0
.

I do not know why this is a thing, but I just encountered this a week or two ago, when using the extra activate script for the first time.

 
bedalton

bedalton



  1/5/2021

Sorry, missed your second post somehow (not enough sleep i think), where you say essentially the same thing. Sorry couldn't add anything more helpful.
 


downloads
cobs
adoptions
creaturelink
metarooms
breeds
 
gallery
art
wallpaper
screenshots
graphics
promos
sprites
dev
hack shack
script reservations
dev resources
active projects
dev forum
 
community
links
advice
chat
polls
resources
creatchi
 
forum
bookmarks
general
news
help
development
strangeo
survivor
mycaves
log in
register
lost pw
2 online
RisenAngel
Papriko
creatures caves is your #1 resource for the creatures artificial life game series: creatures, creatures 2, creatures 3, docking station, and the upcoming creatures family.

contact    help    privacy policy    terms & conditions    rules    donate    wiki