i need a sample script

Get some help with creating maps or modding.
Need a map editor or other tools, look here!
Post Reply
jantje
New user
Posts: 3
Joined: 23 Dec 2015, 03:43

i need a sample script

Post by jantje »

Hallo,
i want to make a script. i want to use .js files.

sample:

i want to add a setpower funtion.

i have make a rules.js file in the folder mijmap.wz/multiplay/script/rules.js

and i have add this to the file.

Code: Select all

function power() {
setPower(1000000); // give yourself 1000000 power instantly 
}

power();
can samone tell me what i do wrong ?

i olso want to set a wether funtion:

Code: Select all

function wather()
{
setWeather(WEATHER_RAIN);
console("its to to rain !");
}

function eventStartLevel()
{
	wather();
	setTimer("wather", 15000);	// start a constant timer function
}

wather();

cant samone build a simple sample for me so i know a bit how it work ?

i last think can you build a sample whit 1 of the 2 funtion whit a include so i olso can see how that works

tnx for the help
greets jantje
Post Reply