Register/Cookie Indexing Opcode; Stored Procedures

Users who are viewing this thread

Jmn

Recruit
It would be great if one register/cookie could be used as an index to another register/cookie (EG reg[0] = cookie[reg[1]]) through some sort of 'indexed load' opcode. Something along the lines of 'reg0=indexed_load(X,Y)' perhaps, with the actual value of Y ignored (only the cookie/register bits would have meaning)

Or perhaps two seperate opcodes could be created for indexing registers and cookies, eliminating the need for fixed reg0 assignment (and a fudgy reg/cookie bit only argument).

Also, some method for manually executing triggers would be nice. They could be used as stored procedures that could be called by a conversation (or another trigger). A few cookies could be reserved by a modder for passing arguments allowing reusable code to be written. A 'check interval' of < 0 could also be used to indicate a trigger that is never supposed to be automatically run (IE only called from another trigger/conversation), which is somewhat cleaner than just putting a rediculously high value in.
 
Jmn said:
Also, some method for manually executing triggers would be nice. They could be used as stored procedures that could be called by a conversation (or another trigger). A few cookies could be reserved by a modder for passing arguments allowing reusable code to be written. A 'check interval' of < 0 could also be used to indicate a trigger that is never supposed to be automatically run (IE only called from another trigger/conversation), which is somewhat cleaner than just putting a rediculously high value in.
I agree. Only workaround to this right now is to set check interval to 0 and watch for value of certain cookie in trigger conditions. When you need to run the trigger you just set the cookie. Sideffect of this is that the trigger won't run immedeately, but only after player returns to the overmap.
 
Back
Top Bottom