help me with set fraglimit from .scr file!!

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
Redliner
Private
Posts: 5
Joined: Sat Aug 30, 2003 2:56 pm
Contact:

help me with set fraglimit from .scr file!!

Post by Redliner »

Please help me! :)
I trying to make a simple mod 4 mohaa!
For dm battles. As the game starts the frag limit is 100 an after 10 seconds it goes down by 1. So For one game is 1000 seconds. And you must kill as many as possible players to have as many frags as possible.
I should be easy.
But. If I add my script to any map a can't set the frag limit from my script (.scr file).
!'ve just added this line to for ex.: maps/dm/mohdm1.scr

//runs my .scr file
exec my.scr

And my .scr file looks like that:

main:
local.time = 1000
local.frag = 100
while ( local.time > 0 )
{
iprintlnbold_noloc (local.frag + " frags remaining!")
wait 10
local.time = local.time - 10
local.frag = local.frag - 1
local.fraglimit = local.frag
}

end

The bug is in the local.fraglimit variable - I DO NOT KNOW HOE TO SET THE FRAGLIMIT!!! WHICH VARIABLE? OR USE "SET" OR SOMETHING???? PLEASE HEPL. :) I am a beginer....
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

To set the fraglimit to local.fraglimit:
setcvar fraglimit local.fraglimit

There you go :wink:
Image
User avatar
Redliner
Private
Posts: 5
Joined: Sat Aug 30, 2003 2:56 pm
Contact:

thanx

Post by Redliner »

Thanx! :)

BTW: Me and my small clan (www.hardjustice.tk) really love your vj_bots opcenter and lakeside. Good work :)
Post Reply