InStateSequence and weapons

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

InStateSequence and weapons

Post by Accensus »

InStateSequence doesn't seem to work when called from a weapon's DoEffect virtual (same with Tick iirc). Is there something finicky with getting that to work? I'm thinking pointers, but so far I found nothing that worked.
ZzZombo
Posts: 317
Joined: Mon Jul 16, 2012 2:02 am

Re: InStateSequence and weapons

Post by ZzZombo »

I don't recall weapons having anything to do with `DoEffect` and even with `Tick` it's moot, since once picked up (as implied by the mentioned `DoEffect`, it's probably picked up), it's put into a special sequence and the result of the function will be not what you expect most of the time, but regardless, sounds more like you are trying to use the function with one of the special weapon states sequences ('Ready', 'Select', etc). This will not work, as those run in context of player in a separate layer, so called `PSprites`.

Return to “Scripting”