Data Realms Fan Forums
http://forums.datarealms.com/

I need a script that will pull things to a certain vector.
http://forums.datarealms.com/viewtopic.php?f=75&t=15749
Page 1 of 1

Author:  Foogooman [ Tue Jul 07, 2009 7:45 pm ]
Post subject:  I need a script that will pull things to a certain vector.

I don't know Lua, and I don't want to learn it all for this weapon because it will take a while to learn. The fact is for that this weapon I need someone to make the script for me.

I am making a weapon for a giant actor. The giant actor has giant fists. So I figured, "hey, wouldn't it be awesome if I could grab stuff with my fists and crush it?"

Which brings me to where I am now. I have made a weapon that looks like a big arm and fist, it all looks nice and whatnot. I have it set up so that holding down fire provides a crushing effect inside the hand. Now all I need is an Lua script that will allow me to press a button and have things in a small radius be sucked into his hands. So, could someone make a script where in a 15 pixel radius, everything is sucked to the center? (IF POSSIBLE USE AN EFFECT THAT DOESN'T REQUIRE CHECKING ALL THE BODIES IN THE MAP, IT GETS WAY TOO LAGGY) Also, how would I set the effect to be in his hand?

Just assign it to F or something, I can always change it later. Thanks in advance! I love you all <3

Author:  mail2345 [ Tue Jul 07, 2009 8:07 pm ]
Post subject:  Re: I need a script that will pull things to a certain vector.

Foogooman wrote:
IF POSSIBLE USE AN EFFECT THAT DOESN'T REQUIRE CHECKING ALL THE BODIES IN THE MAP, IT GETS WAY TOO LAGGY

Impossible, unless you want to grab only one thing at a time.

But there is currently existing gravity code. Just use my attachable hack to find the arm postion, and gravitate stuff to the hand if the distance(since your in lag land, I would recomend using a box instead of a cirlce).

TLB made a nice gravitatemovableobject code. GodlyDesent(Mode contest entry) uses it, my gravity hook uses it, and oribt lands uses it.

Author:  Foogooman [ Tue Jul 07, 2009 8:09 pm ]
Post subject:  Re: I need a script that will pull things to a certain vector.

mail2345 wrote:
Foogooman wrote:
IF POSSIBLE USE AN EFFECT THAT DOESN'T REQUIRE CHECKING ALL THE BODIES IN THE MAP, IT GETS WAY TOO LAGGY

Impossible, unless you want to grab only one thing at a time.

But there is currently existing gravity code. Just use my attachable hack to find the arm postion, and gravitate stuff to the hand if the distance(since your in lag land, I would recomend using a box instead of a cirlce).

TLB made a nice gravitatemovableobject code. GodlyDesent(Mode contest entry) uses it, my gravity hook uses it, and oribt lands uses it.


Yeah, I know of that code. I didn't want to use it because of the lag though. Grabbing one thing at a time would be fine, preferable even. He wouldn't be able to fit more than one actor in his hand anyway.

Author:  mail2345 [ Tue Jul 07, 2009 8:50 pm ]
Post subject:  Re: I need a script that will pull things to a certain vector.

Then use a nice CastMO ray.

Just send out two rays going though the hand and ignoring the actor. When they hit something, find the root, and in case of a conflict, choose the closest one.

Grab it, use the gravitatemo code to the hand's postion and done.

Author:  Foogooman [ Tue Jul 07, 2009 8:51 pm ]
Post subject:  Re: I need a script that will pull things to a certain vector.

mail2345 wrote:
Then use a nice CastMO ray.

Just send out two rays going though the hand and ignoring the actor. When they hit something, find the root, and in case of a conflict, choose the closest one.

Grab it, use the gravitatemo code to the hand's postion and done.


I don't know how to do that... :(


That's why it's in requests after all :-P

Author:  mail2345 [ Tue Jul 07, 2009 9:04 pm ]
Post subject:  Re: I need a script that will pull things to a certain vector.

http://datarealms.com/wiki/index.php/Lu ... #CastMORay
http://datarealms.com/wiki/index.php/Lu ... etMOFromID

Oh, and after you get the MO, get the MO of it's root ID.
Secondly, if the MO ray finds nothing, it returns 255, so check for that.

Author:  Foogooman [ Tue Jul 07, 2009 9:07 pm ]
Post subject:  Re: I need a script that will pull things to a certain vector.

mail2345 wrote:
http://datarealms.com/wiki/index.php/LuaDocs/SceneManager#CastMORay
http://datarealms.com/wiki/index.php/Lu ... etMOFromID

Oh, and after you get the MO, get the MO of it's root ID.
Secondly, if the MO ray finds nothing, it returns 255, so check for that.


You just won't make this easy on me will you? :-(


Well, I guess I should learn Lua at some point, but if someone wants to make the script for me that would be appreciated too. It would speed up this process with this weapon.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/