Page 1 of 1

Glue object to people

Posted: Wed Aug 18, 2004 3:59 am
by SkiLLeT
How can i glue an object on a person or better yet how can i make a person into a object if thats possible.

here is a script but i dont know whats wrong. I want people to turn into the airplane but the plane doesnt attach why?

Code: Select all

plane:
local.plane = spawn script_model
local.plane model "vehicles/stuka_fly.tik" 
local.plane.origin = ( 482.53 2568.24 340.42 )
local.plane.angles = ( 0 180 0)
local.plane.scale = .2


local.trig = spawn trigger_use
local.trig targetname plane
local.trig.origin = ( 482.53 2568.24 340.42 ) // starting point
local.trig setsize ( -20 -20 0 ) ( 20 20 80 )
$plane waittill trigger
local.player = parm.other
local.player tele ( -1038.16 2312.67 1000.13 ) // destination
local.plane.origin = local.player.orgin + ( 0 0 128 )
local.plane glue local.player
local.plane bind local.player
 
local.plane remove
$plane remove
wait 5
thread plane
end

Posted: Wed Aug 18, 2004 10:32 am
by Angex
plane:
local.plane = spawn script_model
local.plane model "vehicles/stuka_fly.tik"
local.plane.origin = ( 482.53 2568.24 340.42 )
local.plane.angles = ( 0 180 0)
local.plane.scale = .2


local.trig = spawn trigger_use
local.trig targetname plane
local.trig.origin = ( 482.53 2568.24 340.42 ) // starting point
local.trig setsize ( -20 -20 0 ) ( 20 20 80 )
$plane waittill trigger
local.player = parm.other
local.player tele ( -1038.16 2312.67 1000.13 ) // destination
local.plane.origin = local.player.orgin + ( 0 0 128 )

local.plane glue local.player
local.plane bind local.player

local.plane remove
$plane remove
wait 5
thread plane


end

Those lines might be causing some problems.

I don't think you need to both bind and glue the plane to the player, I think that bind would be better suited based on what you've said.

Also you shouldn't need to keep adding and removing the plane, just spawn it once, bind it to the player, then when you update the player's origin the plane should be updated with the same transformation.

Posted: Wed Aug 18, 2004 5:05 pm
by lizardkid
also you could just make the player model a plane :roll: isntead of spawning one on them.

Posted: Wed Aug 18, 2004 5:23 pm
by fuhrer
probably know this but glue will move the object ur gluing i.e. plane to person move to the persons origin, bind will keep its origin but it will follow the persons movements.

i tried makin the plays model a toilet once but it wouldnt let me so i made the player invisible n spawned a toilet glued it to the players origin

Posted: Thu Aug 19, 2004 7:01 pm
by SkiLLeT
I still cant attach a plane and i dont know why I took of the bind and it still didnt work. I got it to a point were the plane is attached to the person but i cant take it off cause the script was missed up. how can i glue the right way?

Posted: Fri Aug 20, 2004 1:10 pm
by Angex
You perhaps need to turn off the physics for the player:

Code: Select all

local.player physics_off

Posted: Sat Aug 21, 2004 12:56 pm
by fuhrer
lol i remember workin on something like this with someone before, n i tried the physics off, when it went to glue me to the plane i pinged off straight up.

Posted: Sun Aug 22, 2004 10:26 am
by nuggets
sorry been away for long time :(
but i'm back :D anyway


local.trig = spawn trigger_use
local.trig targetname plane_trigger
local.trig.origin = (482.53 2568.24 340.42)
local.trig setsize ( -20 -20 0 ) (20 20 80)
local.trig setthread plane_thread
end

plane_thread:
local.player = parm.other
local.player.plane = spawn script_model targetname "plane"
local.player.plane model "vehicles/stuka_fly.tik"
local.player.plane.origin = (482.53 2568.24 340.42)
local.player.plane.angles = (0 90 90)
local.player.plane attach $player "Bip01 Spine2" 1 "0 0 0" //x y and z on player
local.player.plane.scale = .2
local.player tele ( -1038.16 2312.67 1000.13)
//to detach use
local.player.plane detach local.player
//to remove
local.player.plane remove