will "call attribue" solve this?
QbAnYtO
Member Posts: 523
basically i want my bullet to cause a "screenshake" effect when it hits another actor.
because i can't use prototypes to control the camera i made a attribute called "shake" and an invisible unlocked actor in the scene (remember this).
then i have on the bullet:
*********************************
when bullet collides with enemies
change attribute "shake" to 1
*********************************
then in that unlocked invisible actor on scene i have these behaviors in it:
*********************************
when attribute "shake" is 1
[
TIMER for 0.5 seconds
-(inside timer) every 0.1 second "camera.origin x-10... (etc etc u get it. the shake effect)
]
After 0.5 seconds
change attribute "shake" to 0
*********************************
ok, so when i shoot to enemies it DOES shake for a few shots. but then it stops working . the shake effect can no longer be reproduced. usually after a few shots. its weird huh? am i doing something wrong?
because i can't use prototypes to control the camera i made a attribute called "shake" and an invisible unlocked actor in the scene (remember this).
then i have on the bullet:
*********************************
when bullet collides with enemies
change attribute "shake" to 1
*********************************
then in that unlocked invisible actor on scene i have these behaviors in it:
*********************************
when attribute "shake" is 1
[
TIMER for 0.5 seconds
-(inside timer) every 0.1 second "camera.origin x-10... (etc etc u get it. the shake effect)
]
After 0.5 seconds
change attribute "shake" to 0
*********************************
ok, so when i shoot to enemies it DOES shake for a few shots. but then it stops working . the shake effect can no longer be reproduced. usually after a few shots. its weird huh? am i doing something wrong?
Comments
i added the collisions behavior to the enemies instead of the bullet since the bullet destroys on collisions....prolly throwing off the whole formula
For .5 sec
--After .5 sec
---Change Attribute to 0
etc.
oh man its fun learning!