Template talk:O: Difference between revisions
Jump to navigation
Jump to search
(, or : doesn't matter in this case but to prevent confusion) |
No edit summary |
||
| Line 15: | Line 15: | ||
:Or also in games with vscript can use something like <code>ent_fire !picker AddOutput "OnSomething !caller:RunScriptCode:printl(self)"</code> which will print the caller | :Or also in games with vscript can use something like <code>ent_fire !picker AddOutput "OnSomething !caller:RunScriptCode:printl(self)"</code> which will print the caller | ||
:Example of checking OnUser1 output. | |||
<dd><pre> | |||
] ent_fire !picker addoutput "OnUser1 whatever" | |||
] ent_pause | |||
Pausing entity I/O events | |||
] ent_fire !picker fireuser1 | |||
] dumpeventqueue | |||
Dumping event queue. Current time is: 955.63 | |||
(955.63) Target: '!picker', Input: 'fireuser1', Parameter ''. Activator: 'Nescius', Caller 'Nescius'. | |||
Finished dump. | |||
] ent_step 1 | |||
] dumpeventqueue | |||
Dumping event queue. Current time is: 955.63 | |||
(955.63) Target: 'whatever', Input: 'Use', Parameter ''. Activator: 'Nescius', Caller 'prop_physics'. | |||
Finished dump. | |||
</pre> | |||
:--[[User:Nescius|Nescius]] ([[User talk:Nescius|talk]]) 09:55, 24 April 2025 (PDT) | :--[[User:Nescius|Nescius]] ([[User talk:Nescius|talk]]) 09:55, 24 April 2025 (PDT) | ||
Revision as of 09:00, 24 April 2025
Empirically determining !activator and !caller
It's easy enough to guess oftentimes, but I was wondering if there was a more error-proof way of determining them (be it reading source code or setting up an I/O chain).
— SirYodaJedi (talk) 09:23, 24 April 2025 (PDT)
- Reading the source code is mostly error proof by just checking what parameters is
.FireOutputor.Setcalled with for example. Checking out activator and caller in IO can be done like this
- Example with checking activator and caller of OnTakeDamage output of prop_physics. I aimed at it and used !picker to target it and addoutput to it first in this case. Then paused the IO. Shot the prop_physics and checked with
dumpeventqueuecommand.
] ent_fire !picker addoutput "OnTakeDamage whatever" ] ent_pause Pausing entity I/O events ] dumpeventqueue Dumping event queue. Current time is: 941.23 (940.83) Target: 'whatever', Input: 'Use', Parameter ''. Activator: 'Nescius', Caller 'prop_physics'.
- Or also in games with vscript can use something like
ent_fire !picker AddOutput "OnSomething !caller:RunScriptCode:printl(self)"which will print the caller
- Example of checking OnUser1 output.
] ent_fire !picker addoutput "OnUser1 whatever" ] ent_pause Pausing entity I/O events ] ent_fire !picker fireuser1 ] dumpeventqueue Dumping event queue. Current time is: 955.63 (955.63) Target: '!picker', Input: 'fireuser1', Parameter ''. Activator: 'Nescius', Caller 'Nescius'. Finished dump. ] ent_step 1 ] dumpeventqueue Dumping event queue. Current time is: 955.63 (955.63) Target: 'whatever', Input: 'Use', Parameter ''. Activator: 'Nescius', Caller 'prop_physics'. Finished dump.