Author |
Topic: Cant wait anymore... |
ivan_cro |
|
General Member Since: Jul 21, 2008 Posts: 463 Last: Oct 27, 2010 [view latest posts] |
|
|
|
playername |
|
Preferred Member Since: Aug 24, 2006 Posts: 821 Last: Apr 15, 2011 [view latest posts] |
|
|
|
|
|
ivan_cro |
|
General Member Since: Jul 21, 2008 Posts: 463 Last: Oct 27, 2010 [view latest posts] |
|
|
Category: CoD2 SP Mapping Posted: Sunday, Nov. 15, 2009 05:13 pm |
|
Ok, thank you, this is my .gsc.
I hope you will be able to help.
Code: #include maps\_utility;
main()
{
setExpFog(0.00015, 0.15, 0.14, 0.13, 0);
setCullDist (4500);
maps\_flak88::main("xmodel/german_artillery_flak88_nm");
maps\_tiger::main("xmodel/vehicle_tiger_woodland_brush");
maps\_load::main();
maps\_mortarteam::main();
maps\sptestmap_fx::main();
ambientPlay("ambient_sptestmap");
thread firesound();
level.player takeallweapons();
level.player giveWeapon("colt");
level.player takeallweapons();
level.player giveWeapon ("m1garand");
level.player giveWeapon ("thompson");
level.player giveWeapon ("fraggrenade");
level.player switchToWeapon ("m1garand");
maps\_vehicle::scripted_spawn(1);
level.vehicle = getent("vehicle", "script_noteworthy");
path = getvehiclenode ("vehicle_start_path", "script_noteworthy");
level.vehicle attachPath(path);
wait .5;
level.vehicle startPath();
level.vehicle waittill("reached_end_node");
level.vehicle notify ("unload");
}
firesound()
{
firesound = getent("bigfire","targetname");
firesound PlayLoopSound("bigfire");
}
IvanFilip
P.S. you mean I rename the script_noteworthy in game on other tank? or? |
|
|
|
playername |
|
Preferred Member Since: Aug 24, 2006 Posts: 821 Last: Apr 15, 2011 [view latest posts] |
|
|
|
|
Category: CoD2 SP Mapping Posted: Sunday, Nov. 15, 2009 05:22 pm |
|
Alright, so we are going to try this. Assuming that each "tank" is targeted to their start node, this should work. What I mean by that is, there should be a "line" in Radiant that connects the "tank" to the "start_node". If their isn't, select the tank, then the start_node and hit "W".
Code:
#include maps\_utility;
main()
{
setExpFog(0.00015, 0.15, 0.14, 0.13, 0);
setCullDist (4500);
maps\_flak88::main("xmodel/german_artillery_flak88_nm");
maps\_tiger::main("xmodel/vehicle_tiger_woodland_brush");
maps\_load::main();
maps\_mortarteam::main();
maps\sptestmap_fx::main();
ambientPlay("ambient_sptestmap");
thread firesound();
level.player takeallweapons();
level.player giveWeapon("colt");
level.player takeallweapons();
level.player giveWeapon ("m1garand");
level.player giveWeapon ("thompson");
level.player giveWeapon ("fraggrenade");
level.player switchToWeapon ("m1garand");
maps\_vehicle::scripted_spawn(1);
// Playername: Multiple tank script
// Alright, so, since we have more than one entity with the script_noteworthy of "vehicle" we use "getEntArray()"
level.vehicle = getent("vehicle", "script_noteworthy");
// Now, leve.vehicle is not an "array" of all of the entities, or tanks.
// What I am going to do is "loop" through all of the tanks to start their paths.
for(i=0;i<0;i++)
{
path = getvehiclenode(level.vehicle.target, "targetname");
level.vehicle attachPath(path);
wait .5;
level.vehicle startPath();
level.vehicle waittill("reached_end_node");
level.vehicle notify ("unload");
}
}
firesound()
{
firesound = getent("bigfire","targetname");
firesound PlayLoopSound("bigfire");
}
|
nullFew tips for coding.
1. Keep the script as short as possible.
2. Don't comment every line. Only comment portions where they may be needed to point something out.
3. Don't over complicate the script, keep it organized and easy to read.
These help you find simple errors and makes it easy to make changes. |
|
|
|
ivan_cro |
|
General Member Since: Jul 21, 2008 Posts: 463 Last: Oct 27, 2010 [view latest posts] |
|
|
Category: CoD2 SP Mapping Posted: Sunday, Nov. 15, 2009 05:33 pm |
|
Thank you!
1.) My tanks are working I hear them, I can destroy them etc..
But they arent going where they are supposed to..and btw you forgot to add getentarray...it stayed getend...in the new script you showed me I changed it so it worked... :)
2.) Is it possible to use two different types of tanks with the same script?
thx!
ivanfilip
UNDER THEY ARENT GOING WHERE THEY ARE SUPPOSED TO: they arent moving trough the pathnodes
edited on Nov. 15, 2009 01:01 pm by IvanFilip |
|
|
|
playername |
|
Preferred Member Since: Aug 24, 2006 Posts: 821 Last: Apr 15, 2011 [view latest posts] |
|
|
|
|
|
ivan_cro |
|
General Member Since: Jul 21, 2008 Posts: 463 Last: Oct 27, 2010 [view latest posts] |
|
|
|
playername |
|
Preferred Member Since: Aug 24, 2006 Posts: 821 Last: Apr 15, 2011 [view latest posts] |
|
|
|
|
Category: CoD2 SP Mapping Posted: Sunday, Nov. 15, 2009 06:11 pm |
|
Possibly. As I said before, make sure that the "tank" is linked to the "start_node". I also found a few errors in my code...
NOTE: I did fix getentarray :P
Code: #include maps\_utility;
main()
{
setExpFog(0.00015, 0.15, 0.14, 0.13, 0);
setCullDist (4500);
maps\_flak88::main("xmodel/german_artillery_flak88_nm");
maps\_tiger::main("xmodel/vehicle_tiger_woodland_brush");
maps\_load::main();
maps\_mortarteam::main();
maps\sptestmap_fx::main();
ambientPlay("ambient_sptestmap");
thread firesound();
level.player takeallweapons();
level.player giveWeapon("colt");
level.player takeallweapons();
level.player giveWeapon ("m1garand");
level.player giveWeapon ("thompson");
level.player giveWeapon ("fraggrenade");
level.player switchToWeapon ("m1garand");
maps\_vehicle::scripted_spawn(1);
// Playername: Multiple tank script
// Alright, so, since we have more than one entity with the script_noteworthy of "vehicle" we use "getEntArray()"
level.vehicle = getEntArray("vehicle", "script_noteworthy");
// Now, leve.vehicle is not an "array" of all of the entities, or tanks.
// What I am going to do is "loop" through all of the tanks to start their paths.
for(i=0;i<level.vehicle.size;i++)
{
vehicle = level.vehicle[i]
path = getvehiclenode(vehicle.target, "targetname");
vehicle attachPath(path);
wait .5;
vehicle startPath();
vehicle waittill("reached_end_node");
vehicle notify ("unload");
}
}
firesound()
{
firesound = getent("bigfire","targetname");
firesound PlayLoopSound("bigfire");
}
edited on Nov. 15, 2009 01:12 pm by playername |
nullFew tips for coding.
1. Keep the script as short as possible.
2. Don't comment every line. Only comment portions where they may be needed to point something out.
3. Don't over complicate the script, keep it organized and easy to read.
These help you find simple errors and makes it easy to make changes. |
|
|
|
ivan_cro |
|
General Member Since: Jul 21, 2008 Posts: 463 Last: Oct 27, 2010 [view latest posts] |
|
|
Category: CoD2 SP Mapping Posted: Sunday, Nov. 15, 2009 06:13 pm |
|
|
|
|
|
ivan_cro |
|
General Member Since: Jul 21, 2008 Posts: 463 Last: Oct 27, 2010 [view latest posts] |
|
|
Category: CoD2 SP Mapping Posted: Sunday, Nov. 15, 2009 06:20 pm |
|
WHY GODDAMNIT?! i now get error
path = getvehiclenode(vehicle.target, "targetname");
bad syntax!?!?!?!?!?!?! |
|
|
|