arielnmz Posted September 8, 2011 Share Posted September 8, 2011 Ok, im getting tired of this... I want this object ([email protected]) to apply a velocity towards ([email protected] [email protected] [email protected]) continuously until it reaches that point... but it only flies in a circle going nowhere... the "throw object" opcode works, but it doesnt goes fast enough... hope you can help me out with this... Link to comment Share on other sites More sharing options...
BnB Posted September 8, 2011 Share Posted September 8, 2011 Tried 034E? Link to comment Share on other sites More sharing options...
ZAZ Posted September 8, 2011 Share Posted September 8, 2011 read Object COLLISION check/ throw object CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
arielnmz Posted September 9, 2011 Author Share Posted September 9, 2011 Thanks... and yes, ive tried 034e and it just adds [speed] to the coords until it reaches its destination, i cant figure a way to make speed relative to the angle of the object/destination and move to there... and throw works fine but i want to avoid to attach the object to a ball and it's slow... my script used it before but applying a velocity is faster... i hope you understood i somethimes dont know how to explain myself.. hehe Link to comment Share on other sites More sharing options...
ZAZ Posted September 9, 2011 Share Posted September 9, 2011 Thanks... and yes, ive tried 034e and it just adds [speed] to the coords until it reaches its destination, i cant figure a way to make speed relative to the angle of the object/destination and move to there... the multiplicator gives the distance as well the speed bigger distance gives higher speed sin and cosine gives offsets of radius of 1.0 of the object the multiplicator (60.0) increase the radius [email protected] *= 60.0 // (float) [email protected] *= 60.0 // (float) 0172: [email protected] = actor $PLAYER_ACTOR Z_angle0453: set_object [email protected] XY_rotation 0.0 0.0 angle [email protected]: [email protected] = sine [email protected] // (float)02F7: [email protected] = cosine [email protected] // (float)[email protected] *= 60.0 // (float)[email protected] *= 60.0 // (float)[email protected] *= -1.0 0392: make_object [email protected] moveable 10381: throw_object [email protected] velocity_in_direction [email protected] [email protected] [email protected] and throw works fine but i want to avoid to attach the object to a ball and it's slow... my script used it before but applying a velocity is faster... i hope you understood i somethimes dont know how to explain myself.. hehe the objects have different behaviours you have to think about what you wanna do, do you need a collisions check or should it just possible to throw it not all objects are throwable and not much objects can pump a ped or a car CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
arielnmz Posted September 12, 2011 Author Share Posted September 12, 2011 Thanks zaz I was doing more and more "field work" and I figured out the same thing... not all objects have the same dynamics (some " are thrown" faster/easier than others) and some dont have certain collision checks... and one more question, why to invert (@15 *= -1.0) the X speed before 0381?? Link to comment Share on other sites More sharing options...
ZAZ Posted September 12, 2011 Share Posted September 12, 2011 Thanks zaz I was doing more and more "field work" and I figured out the same thing... not all objects have the same dynamics (some " are thrown" faster/easier than others) and some dont have certain collision checks... and one more question, why to invert (@15 *= -1.0) the X speed before 0381?? i don't know exactly, it was just neccesary to give one parameter the opposite consider that the results of the sin/cosin should work in the unit circle, where you have ++ coords in northeast quater, +- coords in southeast, -+ coords in southwest and -- coords in northwest the throw direction depends to the current location of the object and would be different, each if it is in northeast, southeast, southwest or northwest unless one param will be multiplicated with -1 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
arielnmz Posted September 15, 2011 Author Share Posted September 15, 2011 I see... well thanks!! I've found that absolute sine/cosine floats work wonders with move, too (I think this is more accurate because it only "steps" the object ignoring dynamic/physics that each object has, not like a throw or applying a velocity).. thanks!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now