push up script?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Tazz
Second Lieutenant
Posts: 155
Joined: Fri Feb 16, 2007 1:29 pm
Contact:

push up script?

Post by Tazz »

hey guys i was playing with a push up script a while back and now i need to put it in a map...only problem is i dont know where i found it...i did a search on here and MRU but cnt find it....basically its just a lite that when u hit it ur not teleported ur just pushed straight up in the air....any helpw ould be appreciated....thx again yall
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Make a trigger_multipleall and give it a setthread to the following thread:

Code: Select all

anti_gravity_pad:
   local.player = parm.other
   local.player.velocity[2] += 800 // adjust this value by trial & error
end
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Tazz
Second Lieutenant
Posts: 155
Joined: Fri Feb 16, 2007 1:29 pm
Contact:

Post by Tazz »

kewl man thx alot.......


ok i just tried it but it doesnt work i tried it with the end between the 2 and without it ....this is what i have that doesnt work

Code: Select all

thread push

end

push:

local.mutrig = spawn trigger_multipleall
local.mutrig origin ( -1833 -704 109 )
local.mutrig setsize ( -10 -10 -10 )( 10 10 10 )
local.mutric setthread anti-gravity_pad

end

anti_gravity_pad: 
   local.player = parm.other 
   local.player.velocity[2] += 700 // adjust this value by trial & error 
end

now this is after the level waittilspawn
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Code: Select all

local.mutric setthread anti-gravity_pad

Code: Select all

anti_gravity_pad:
No wonder. ;) It's local.mutrig and anti_gravity_pad.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Tazz
Second Lieutenant
Posts: 155
Joined: Fri Feb 16, 2007 1:29 pm
Contact:

Post by Tazz »

hehehe i knew it would be something easy or a typo with MY typing lol
User avatar
LilChefDeath
Corporal
Posts: 36
Joined: Sun Nov 26, 2006 7:48 am

Post by LilChefDeath »

Them darn MFDs making typos :D
Image

Code: Select all

 local.player uhh_whatNow?" 
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Here is another way this will make them bounce up and down a few times .

push_player:

local.trigger = spawn trigger_push angle -1 origin self.origin
local.trigger setsize ( -100 -100 0 ) ( 100 100 100)
local.trigger speed 500
wait 5
local.trigger remove

end
Image
Tazz
Second Lieutenant
Posts: 155
Joined: Fri Feb 16, 2007 1:29 pm
Contact:

Post by Tazz »

thanx man i think thats the one i was looking for...i already got it going though but thx for the reply=)...no on to other errors -(
Tazz
Second Lieutenant
Posts: 155
Joined: Fri Feb 16, 2007 1:29 pm
Contact:

Post by Tazz »

ok im doing something else with this now....how do i make multiple push ups using the same thing?.....i know its something like thread push_player (coords here?) ( and here? ) ( something like this? )


i want to thread push_player then add all my coords then only have to do the push_player script one time


thread push_player ( coords ) ( coords ) ( coords )

end

push_player:
local.smoke1 = spawn script_model model "static/corona_reg.tik"
local.smoke1 origin ( -150 141 -92 )
local.smoke1 light 1 1 1 25 // r g b radius
local.smoke1 scale .50
local.smoke1 notsolid
local.trigger = spawn trigger_push angle -1 origin self.origin
local.trigger origin ( -180 141 -92 )
local.trigger setsize ( -10 -10 0 ) ( 10 10 10)
local.trigger speed 900
wait 2
thread push_player

end



isnt it something like this?
$oldier Of Ra
Lieutenant Colonel
Posts: 404
Joined: Sun Oct 16, 2005 7:16 pm
Location: Belgium
Contact:

Post by $oldier Of Ra »

lol, I don't think so m8. First you must know how threading or executing scripts with values etc works. I g2g, I'll reply to this when I get back m8.

EDIT: Back:

thread pushplayer ( orb coords XYZ ) ( trigger coords XYZ )
push_player local.r local.b:
local.smoke1 = spawn script_model model "static/corona_reg.tik"
local.smoke1.origin = local.r
local.smoke1 light 1 1 1 25
local.smoke1 scale .50
local.smoke1 notsolid

local.trigger = spawn trigger_push angle -1 origin self.origin
local.trigger.origin = local.b
local.trigger setsize ( -10 -10 0 ) ( 10 10 10)
local.trigger speed 900
end
I marked red where it has gone wrong, also, why 3 coords in your post?
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)

For all your bot needs!!!!

$oldier Of Ra.
Tazz
Second Lieutenant
Posts: 155
Joined: Fri Feb 16, 2007 1:29 pm
Contact:

Post by Tazz »

theres 3 coords in my post because i want to put 3 triggers around the map so i will have 3 push up areas....im making just a goof-off version on stalingrad and just going to make it crazy with stuff....teleports push up scripts and funny stuff.....but i want 3 push ups thats y there are 3 coords.....i can do the one...... but i know with teleports u can do this

Code: Select all

thread trigger_maker ( 1349 4093 -199 ) ( -839 2465 -107 )
         thread trigger_maker ( 853 2386 .15 ) ( -839 2465 -107 )
         thread trigger_maker ( 2231 -929 -72 ) ( 2714 2175 -180 )

this is origin and destination in the ()'s i thought i could do same with the push up scripts instead of having to put so many scripts in there all saying the same thing
$oldier Of Ra
Lieutenant Colonel
Posts: 404
Joined: Sun Oct 16, 2005 7:16 pm
Location: Belgium
Contact:

Post by $oldier Of Ra »

So you mean he pushes the player a few feat in the air and there he will be pushed higher again and then again? Or push him up, tele him to the next push trigger somewhere else etc?
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)

For all your bot needs!!!!

$oldier Of Ra.
Tazz
Second Lieutenant
Posts: 155
Joined: Fri Feb 16, 2007 1:29 pm
Contact:

Post by Tazz »

no i mean there will be one push trigger at say ( 1 1 1 ) then there will be another one at say ( 2 2 2 ) then another one at say ( 3 3 3 ).....3 seperate push triggers but they all do the same thing.....they all r the same effect just doing it at a different location for each one....and then the teleports are totally seperate also....so the tele ports would be at like say ( 6 6 6 ) and ( 8 8 8 )....so nothing to do at all with the push triggers.....




EDIT:
ok i figured it out now...i found the old push trigger i was using before and set it up like this

Code: Select all

waitthread push_player ( -180 141 -102 )::( 339 665 -110 )::( 620 -198 260 )<<My 3 Different Locations for the Triggers


waittill prespawn


waittill spawn


push_player local.origin_array:
for(local.i=1;local.i<=local.origin_array.size;local.i++)
{
local.trigger = spawn trigger_push angle -1 origin  local.origin_array[local.i]
local.trigger setsize ( -50 -50 0 ) ( 50 50 50)
local.trigger speed 500

local.trigger2 = spawn trigger_multiple
local.trigger2.origin = local.origin_array[local.i]
local.trigger2 setsize ( -52 -52 0 ) ( 52 52 52 ) //SET BIGGER THAN PUSH TRIGG
local.trigger2 thread Gravity 

local.orb = spawn script_model
local.orb model "static/corona_util.tik"
local.orb.origin = local.origin_array[local.i] 
local.orb.angles = ( 0 0 0 )
local.orb.scale = 0.5
local.orb notsolid
local.orb ghost
}
end 

Gravity:

self waittill trigger
local.player=parm.other
if (local.player.Gravity==1)
end
local.player.Gravity=1
local.player gravity .2 //SET GRAVITY
wait 3                 //SET GRAVITY TIMER
local.player gravity 1  //SET GRAVITY BACK
local.player.Gravity=0
end




Thanx for the help man...........
$oldier Of Ra
Lieutenant Colonel
Posts: 404
Joined: Sun Oct 16, 2005 7:16 pm
Location: Belgium
Contact:

Post by $oldier Of Ra »

np, I hope it works out...with whatever you're doing :)
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)

For all your bot needs!!!!

$oldier Of Ra.
Post Reply