Home   Help Search Login Register  

Author Topic: Throw  (Read 833 times)

0 Members and 1 Guest are viewing this topic.

max_killer_payne

  • Guest
Throw
« on: 04 May 2003, 21:36:57 »
Hi everyone, im making a mission where u r a POW, who is experimented on, and as a result u become a mutant, a reject from society, u have this one power via the action menu, allows u 2 launch the nearest enemy flying, not too far but say 30 yards. And Im having trouble making the script can ne1 help?

I know ill have to do somethin like this

this addaction ["Use teleknises","throw.sqs"]

but wot command will make it throw the nearest enemy and which command will throw the enemy?? Can ne1 help

fragsta

  • Guest
Re:Throw
« Reply #1 on: 06 May 2003, 22:44:53 »
I think I may have an idea. Maybe you could use the setpos command. Or, alternatively, you could have this person be thrown into the air, and then fall to his doom. this can be dome easily, but i don't know exactly how it would make the target go up. I'll look into it, I'm not a guru, in fact I'm far from it, but no1 else seems 2 think that ur idea is ne good. I do...watch this space.

Stalker

  • Guest
Re:Throw
« Reply #2 on: 17 May 2003, 19:10:51 »
thenameofthemanuwanttothrow setvelocity [100,0,0] He will fly aaaaaaaaaaawaaaaaaaaaayyyyyyy

max_killer_payne

  • Guest
Re:Throw
« Reply #3 on: 27 May 2003, 12:30:37 »
cheers Stalkey and Fragsta

fragsta

  • Guest
Re:Throw
« Reply #4 on: 27 May 2003, 12:45:20 »
hey i tried that and it didnt do anything!

BullzEyeOnMyBack

  • Guest
Re:Throw
« Reply #5 on: 28 May 2003, 09:48:56 »
I think you have to give him some height first before throwing him... I think his feet may be "planted" on the ground so to speak.  

To figure out what is the nearest person to you... you would have to use the "nearstobject" command to find him
something like this: (i think this will throw him backwards)


throw_man = nearestObject [getpos player, <man class name here>]

throw_man setvelocity [0,0,5]
~0.02
throw_man setvelocity [20*sin (getdir throw_man-180), 20* cos(getdir throw_man-180), 20]
exit

I'm not entirely sure how to get the nearest object class name for people...you would have to search to get it i think.
and you would have to fool around with the numbers to get the desired affect.
I hope this helps!!

max_killer_payne

  • Guest
Re:Throw
« Reply #6 on: 28 May 2003, 22:07:28 »
Thanks ill try that 2nite

BullzEyeOnMyBack

  • Guest
Re:Throw
« Reply #7 on: 29 May 2003, 11:29:06 »
ofcourse you can also put it in a loop and check to see if the person is within a given radius....so then you throw everyone within that radius

like...
#loop


_dist= throw_man distance player
?(_dist >=10): goto "end"
...script up above...
goto "loop"

#end
exit

 ;)