HzFox 1 Posted March 26, 2018 Share Posted March 26, 2018 hi, I'm trying to make a push effect for a skill, but for some reason, the ball I use for this effect, acts as if it were in immaterial mode. https://gyazo.com/6c8b0226df30f48638896d691fdf44b2 I would like it to work this way ... although watching the video, I do not know if it is the ball that pushes the enemy. https://gyazo.com/c1f88a777d9eee7a6c12f35ee7210980 I use the second video to show the example effect (it's not my effect) in the ball i have 2 scripts frist : vector startingSize; integer tog; default { state_entry() { startingSize = llGetScale(); } touch_start(integer total_number) { if( tog = !tog ) { llSetTimerEvent(0.02); } else { llSetTimerEvent(0.0); llSetScale( startingSize ); } } timer() { llSetScale( llGetScale() + <2.100, 2.100, 2.100> ); } } and default { collision_start(integer num_detected) { llPushObject(llDetectedKey(0),<100,100,100>, <100,100,100>, TRUE); } } the ball Should not push me? Link to post Share on other sites
Lucia Nightfire 1,705 Posted March 26, 2018 Share Posted March 26, 2018 Its too bad we don't have llPushObjectVelocity() yet. Link to post Share on other sites
Rolig Loon 26,972 Posted March 27, 2018 Share Posted March 27, 2018 7 hours ago, HzFox said: the ball Should not push me? Well, maybe. The first vector in your llPushObject call should be a vector pointing away from the ball, in the direction of you. So, it should be something like (llDetectedPos() - llGetPos()) * some_proportionality_factor , where you can experiment to see how big to make the proportionality factor. You might want to include your own mass (or the ball's mass) as part of that factor. The second parameter is the angular velocity that you want to put on the pushed object (you). That should probably be ZERO_VECTOR. If you use that approach in the llPushObject call, you will at least be on the right track. There's one big problem, though: friction. If your avatar's feet are on the ground, it will be hard to push you, especially if the ball is above waist level. For that reason, you may want to add a little extra vertical force to your linear impulse vector, so that you are pushed UP, off the ground. If the ball is moving, this all gets to be more complicated, because you may need to take the ball's own velocity into account 2 Link to post Share on other sites
HzFox 1 Posted March 27, 2018 Author Share Posted March 27, 2018 I'm going to try what you say! but, when it is often complicated, I usually change the project to something simpler ... I will remain with the intrigue of how the creator of this script, has managed to do this: https://gyazo.com/c1f88a777d9eee7a6c12f35ee7210980 if someone knows how to copy that effect! - always push, if you are flying, if you are on the ground, always push everyone is an "immaterial" ball that dies after 3 seconds unfortunately I will have to change the project because of the difficulty of the script, I made it more basic ... even if someone knows about that other effect! it would be great Link to post Share on other sites
Rolig Loon 26,972 Posted March 27, 2018 Share Posted March 27, 2018 It's hard to tell what that image shows. It looks as if the person is wearing an attachment of some kind. I don't know what you mean by the word "immaterial", but if that really is an attachment, it will not collide with anyone. I suspect that the red sphere is a visual distraction and that the "push" is unrelated to it. You should also know that llPush will only work in areas where pushing is allowed (not many of those except in RP regions), or when the script is pushing its owner. Otherwise, a device like the one you are describing could be used as a griefer tool. It could get you in a lot of trouble. Link to post Share on other sites
Berksey 95 Posted March 28, 2018 Share Posted March 28, 2018 I made a "bumper attachment" that blasted people away on collision, but I'm not saying how I made it work. It was for a combat system that nobody showed any interest in, so yeah... Like Rolig, I wouldn't advise making anything like that and wearing it out and about, because if a region does have Push enabled, and it works all great and everything, if you're not in a combat sim or similar place, it could seriously lose you a Second Life account. Some people think it's all fun and would laugh it off, but others really don't like having their avatars thrown around like that. Link to post Share on other sites
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
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