i'd like to learn how to script in CoD1 but i've got absolutely no idea how to start or how do achieve what i want. i read through the tutorial posted by Drofder so i understand the basics of it but i dont see any way of starting from scratch and getting to a fully working script.
what i'd like to do is create a script for teleport. you should be able to specify certain points in the map by putting coordinates and if a player is there and presses F he teleports.
i've got a script here but i dont understand as to why these commands are there exactly in this row exactly like that and why they cant be different... this script was created by megazoR whos been my jumping mate for years...
Code: Select all
tigertown_jump_expansion()
{
srv_tig1 = (-2345, -2275, 348);
srv_tigtele1 = (124, -27, 402);
srv_tig2 = (-298, 403, 231);
srv_tigtele2 = (-1495, -998, 648);
for (i = 0; i < level.awe_allplayers.size; i++)
{
if (isDefined(level.awe_allplayers[i]) && level.awe_allplayers[i].sessionstate == "playing" && level.awe_allplayers[i] useButtonPressed()) //player? playing? pressed Use?
{
if (distance (level.awe_allplayers[i].origin, srv_tig1) < 30)
level.awe_allplayers[i] setOrigin(srv_tigtele1);
else if (distance (level.awe_allplayers[i].origin, srv_tig2) < 30)
level.awe_allplayers[i] setOrigin(srv_tigtele2);
}
wait .05;
}
thread tigertown_jump_expansion();
}
i do not want to learn other programming languages first before doing this so i hope we'll be able to sort this out without knowing hundreds of other programming language Quake C is based on...
thanks for your help in advance guys
Edit by Rezil: code tags