immunity for certain areas

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
hOr[R]r0r^
Private
Posts: 7
Joined: Tue Aug 24, 2004 4:02 pm

immunity for certain areas

Post by hOr[R]r0r^ »

Hello got one "simple" question (I'm a beginner)
I've found this script on the net:



// set scoreboard messages
setcvar "g_obj_alliedtext1" "DIE"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "none"

level waitTill prespawn

//*** Precache Dm Stuff
exec global/DMprecache.scr

level.script = maps/dm/ngamerz.scr

level waittill spawn
thread immunity

end

immunity:

local.imtrig = spawn trigger_multiple
local.imtrig.origin = ( COORDS )
local.imtrig setsize ( -90 -90 -0 ) ( 90 90 110 )
local.imtrig message "You are now imune for 2 mins! Have some fun!"
local.imtrig wait 1
local.imtrig delay 0
local.imtrig setthread immunity2
local.imtrig targetname imtrig

end

immunity2:

local.player = parm.other

if (local.player.pack == 1)
{
end
}

local.player.pack = 1
local.player god

wait 120

local.player god

wait 10

local.player.pack = 0

goto immunity
end

(If the script works you're immun in a certain area for 2 minutes)

I don't know how 2 let this script work what should i do in MOHAradiant
Must I make a trigger_multiple? if I must what should be the Keys/Values for the trigger? and what is this: local.imtrig.origin = ( COORDS ) must i make also a script origin with keys/values?

Can someone help me what to do in MOHradient?

Srry for my bad English
Ty
User avatar
Mj
Map Reviewer
Posts: 1394
Joined: Sun Apr 25, 2004 3:36 pm
Location: England

Post by Mj »

This is a pure script thing, nothing needs to be done in radient :)

How to make it work, is find the co-ordinates of the place you want it to happen in, for example

local.imtrig.origin = ( 80 -176 23 )

To find co-ordinates in a certain map, run around until you are in the required place, and type in the console coord, and it will come up with the three numbers, the X, Y and Z values :)

Hope this helps :)


thread immunity //makes the thread happen

end

immunity: //the thread

local.imtrig = spawn trigger_multiple //spawns a trigger multiple
local.imtrig.origin = ( COORDS ) //At this place
local.imtrig setsize ( -90 -90 -0 ) ( 90 90 110 ) //and being this size
local.imtrig message "You are now imune for 2 mins! Have some fun!" //makes this message pop up on screen
local.imtrig wait 1 //makes it wait - a small gap
local.imtrig delay 0
local.imtrig setthread immunity2 // sets the thread immunity2
local.imtrig targetname imtrig sets the triiger multiples targetname as imtrig

end

immunity2:

local.player = parm.other //dont ask

if (local.player.pack == 1) //if godmode is already on, do nothing
{
end
}

local.player.pack = 1 //Makes it so it tells ^^that you have godmode on
local.player god //makes you have godmode

wait 120 //wait 2 minuits

local.player god //turns off godmode

wait 10 //5 seconds

local.player.pack = 0 //Tells ^^that you do not have godmode

goto immunity //goes to the top of the thread
end


Hope it helps :)
ImageImage
hOr[R]r0r^
Private
Posts: 7
Joined: Tue Aug 24, 2004 4:02 pm

Post by hOr[R]r0r^ »

haha n1
fist i've 2 finish schoolcrap and then i'll test it but i'm sure it will work;)
th8 for the decscriptions i understand the scripting part much more
hOr[R]r0r^
Private
Posts: 7
Joined: Tue Aug 24, 2004 4:02 pm

Post by hOr[R]r0r^ »

or i'm a comlplete idiot or something i wrong/missing
this is the whole scr:

// Ngamerz
// ARCHITECTURE: hOr[R]r0r
// SCRIPTING: hOr[R]r0r

// set scoreboard messages
setcvar "g_obj_alliedtext1" "DIE"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "none"

level waitTill prespawn

//*** Precache Dm Stuff
exec global/DMprecache.scr

level.script = maps/dm/ngamerz.scr

level waittill spawn

end

thread immunity

immunity:

local.imtrig = spawn trigger_multiple
local.imtrig.origin =( 492 304 8 ) //right>?
local.imtrig setsize ( -90 -90 -0 ) ( 90 90 110 )
local.imtrig message "You are now imune for 2 mins! Have some fun!"
local.imtrig wait 1
local.imtrig delay 0
local.imtrig setthread immunity2
local.imtrig targetname imtrig

end

immunity2:

local.player = parm.other

if (local.player.pack == 1)
{
end
}

local.player.pack = 1
local.player god

wait 120

local.player god

wait 10

local.player.pack = 0

goto immunity
end



If u/someone can help me once more it will be gr8
Post Reply