Duke4.net Forums: Can't change cstat on projectile - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Can't change cstat on projectile

User is online   Danukem 

  • Duke Plus Developer

#1

I have a sprite projectile and I'm just trying to get the cstat to change while it is in flight, randomly reversing the bits for x-flipping and y-flipping to simulate it turning in the air. But the cstat seems to be on hard lock-down. Changing the cstat in EVENT_GAME does nothing. It doesn't matter whether I change it via setactor or setthisprojectile. Most frustrating, even if I add the sprite to the list processed in EVENT_ANIMATESPRITES, changing the corresponding tsprite cstat still does nothing. I don't know what else to try.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #2

Could you post a test case?
0

User is online   Danukem 

  • Duke Plus Developer

#3

EDIT2: Got it working. I still don't understand why I couldn't get it to work by changing tsprites, but my original solution now works because I fixed a stupid mistake (I didn't realize I had disabled event processing on the sprite in another part of the code).

EDIT: Still a problem, despite a mistake that I found and fixed. Still have no clue.

Here. This uses a tile that is already in the game but not normally as a projectile. I wonder if that could be the issue?

Spoiler


This post has been edited by Trooper Dan: 28 May 2016 - 01:59 PM

0

User is offline   Hendricks266 

  • Weaponized Autism

  #4

View PostTrooper Dan, on 28 May 2016 - 01:26 PM, said:

I still don't understand why I couldn't get it to work by changing tsprites, but my original solution now works because I fixed a stupid mistake (I didn't realize I had disabled event processing on the sprite in another part of the code).

Did you forget to add 16 to the sprite's mdflags?

View PostTrooper Dan, on 28 May 2016 - 01:26 PM, said:

I don't want to upload the entire project in its current state just for this problem,

Me neither. :) A test case usually implies an individual CON module that exhibits the problem and nothing more, unless the problem can only be reproduced as part of a whole.
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options