Blood direction stuff
skroton May 8th, 2016 (edited) 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- So, add the +SEEKERMISSILE flag to the projectile that is hitting the player. It won't actually seek unless you call the specific function that does the seeking.
- Then add to the player actor */
- var int user_blood_x;
- var int user_blood_y;
- var int user_blood_z;
- var int user_blood_angle;
- /* Then in the xdeath/death of the projectile call the following script */
- Script 1 void
- int vel_x, vel_y, vel_z, angle;
- vel_x = GetActorVelX(0);
- vel_y = GetActorVelY(0);
- vel_z = GetActorVelZ(0);
- angle = VectorAngle (vel_x, vel_y);
- SetActivator(0, AAPTR_TRACER); /* set activator to tracer of projectile, which is target of monster that fired it */
- SetUserVariable (0, "user_blood_x", vel_x);
- SetUserVariable (0, "user_blood_y", vel_y);
- SetUserVariable (0, "user_blood_z", vel_z);
- SetUserVariable (0, "user_blood_angle", angle);
- /* You now have access to all of the above user_vars in the decorate of the player actor, and it will always use the var of the projectile that most recently hit them.
- Remember to divide all vars by 65536 in the decorate because they are fixed number values.
- Remember that the "user_blood_angle" var is in fixed point angle, so 0 to 1.0 (or 0 to 65536). */
RAW Paste Data