Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 87 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 SP Mapping
Call of Duty 2 single player mapping, scripting and everything single player.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Cant wait anymore...
ivan_cro
General Member
Since: Jul 21, 2008
Posts: 463
Last: Oct 27, 2010
[view latest posts]
Level 5
Category: CoD2 SP Mapping
Posted: Sunday, Nov. 15, 2009 04:59 pm
I really need that Tiger tank script, I've asked for it REALLY lot of times.
Please if someone could be so kind to give me .gsc example of moving tiger script.

If I use Call of Duty 2 Infinity ward's .gsc's It will not work beacuse that tiger script is combined with something that will happend before or after it.

And if I use script from Moving Tank Tutorial for CoD2, I can only use one vehicle, beacuse I will get error: getent used with more than one entity.

Please if someone could be so kind and help me.

IvanFilip
Share |
playername
Preferred Member
Since: Aug 24, 2006
Posts: 821
Last: Apr 15, 2011
[view latest posts]
Level 7
Forum Moderator
Im a fan of MODSonair
Category: CoD2 SP Mapping
Posted: Sunday, Nov. 15, 2009 05:07 pm
Hi Ivan! You are fine using multiple tanks in the same map! The error you are getting is from having more than one "entity" or tank with the same "targetname". Since there is more than one, you have to use "getentarray()" instead of "getent()".

If you post your current .gsc, we can help you add more than one tank with the same targetname!
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.
Share |
ivan_cro
General Member
Since: Jul 21, 2008
Posts: 463
Last: Oct 27, 2010
[view latest posts]
Level 5
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?
Share |
playername
Preferred Member
Since: Aug 24, 2006
Posts: 821
Last: Apr 15, 2011
[view latest posts]
Level 7
Forum Moderator
Im a fan of MODSonair
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.
Share |
ivan_cro
General Member
Since: Jul 21, 2008
Posts: 463
Last: Oct 27, 2010
[view latest posts]
Level 5
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 [lol] 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
Share |
playername
Preferred Member
Since: Aug 24, 2006
Posts: 821
Last: Apr 15, 2011
[view latest posts]
Level 7
Forum Moderator
Im a fan of MODSonair
Category: CoD2 SP Mapping
Posted: Sunday, Nov. 15, 2009 06:02 pm
Yes you can! Just find the proper "init" function for it, like you did with this:
maps\_tiger::main("xmodel/vehicle_tiger_woodland_brush");

The moving / path connecting part of the vehicles are all global!
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.
Share |
ivan_cro
General Member
Since: Jul 21, 2008
Posts: 463
Last: Oct 27, 2010
[view latest posts]
Level 5
Category: CoD2 SP Mapping
Posted: Sunday, Nov. 15, 2009 06:04 pm
i got question, why my tanks arent moving? is that beacuse of this: path = getvehiclenode(level.vehicle.target, "targetname");
Share |
playername
Preferred Member
Since: Aug 24, 2006
Posts: 821
Last: Apr 15, 2011
[view latest posts]
Level 7
Forum Moderator
Im a fan of MODSonair
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.
Share |
ivan_cro
General Member
Since: Jul 21, 2008
Posts: 463
Last: Oct 27, 2010
[view latest posts]
Level 5
Category: CoD2 SP Mapping
Posted: Sunday, Nov. 15, 2009 06:13 pm
My tiger is connected to the start_node which has the script_noteworthy of vehicle_start_path. And that start_node is connected to another vehicle node which makes the tiger path.

[jumping][idea][crazy]
Share |
ivan_cro
General Member
Since: Jul 21, 2008
Posts: 463
Last: Oct 27, 2010
[view latest posts]
Level 5
Category: CoD2 SP Mapping
Posted: Sunday, Nov. 15, 2009 06:20 pm
WHY GODDAMNIT?! i now get error [duh]

path = getvehiclenode(vehicle.target, "targetname");

bad syntax!?!?!?!?!?!?!
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 SP Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»