
i'm creating a new codjumper map

i looked everywhere and the only thing i can find is something about elevators. can som1 tell me how i can rotate
brushes or let it moove over the map. all help will we greatly appreciated

greetz
Moderator: Core Staff
KillerSam wrote:There are loads of tutorials on this website, check out the mapping tutorial forums, most of the cod1/cod2 stuff still applies in cod4.
Code: Select all
main()
{
thread moveEnt();
}
moveEnt()
{
ent = getEnt("b1","targetname");
//Gets a single entity with the value 'b1' from key 'targetname'
//then saves it in the variable 'ent'
while(1)
//A 'while' loop, code in the curly brackets below will execute as long as
//the map is active
{
ent moveZ(200, 1);
//Common syntax: <variable> <function>
//You 'call' a function on an entity, basically this means that, in
//our case, the function 'moveZ' will do something with entity 'ent' ie.
//move it along the Z axis. The function moveZ takes two integers(whole numbers)
//moveZ(int units, int time,<optional>int accel,<optional>int deccel);
//in our case, we move our entity 200 units in 1 second.
ent waittill("movedone");
//This makes the thread wait until entity 'ent' is done moving. Sort of like
//notifiying when to continue. Other examples include "rotatedone", "trigger" etc.
ent moveZ(-200,1);
//Same thing, but in reverse
ent waittil("movedone");
//Now here we've reached the end of the 'while' block of code. Because it's
//an infinite loop, at this point the code starts repeating, so
//ent moveZ(200, 1) is called, then ent waittill("movedone"), then
//ent moveZ(-200,1) and so forth.
}
}
Users browsing this forum: No registered users and 2 guests