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

Members Online

»
0 Active | 60 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 subscribe
Author Topic: After a spawn trigger
Carl21221
General Member
Since: Apr 13, 2006
Posts: 134
Last: Jul 31, 2015
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Saturday, Oct. 13, 2007 08:09 pm
Hi again lol

Ive put a spawn trigger in front of a gate, so when i walk through it enemies spawn and attack me. Is it possible to make an ally start moving straight after i have killed everybody the trigger had spawned? If so, how would i do this?

Ty in advance
Share |
Carl21221
General Member
Since: Apr 13, 2006
Posts: 134
Last: Jul 31, 2015
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Sunday, Oct. 14, 2007 01:53 pm
bump
Share |
eganwotv
Deactivated Account
Since: May 28, 2007
Posts: 961
Last: Oct 31, 2010
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD2 SP Mapping
Posted: Sunday, Oct. 14, 2007 03:35 pm
Scripts [rocking]
Share |
Carl21221
General Member
Since: Apr 13, 2006
Posts: 134
Last: Jul 31, 2015
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Sunday, Oct. 14, 2007 03:39 pm
Could you give me a link to a tut if there is one? Or could you show me how its done please?
Share |
Ace008
General Member
Since: Jul 22, 2005
Posts: 738
Last: Jan 3, 2009
[view latest posts]
Level 6
Category: CoD2 SP Mapping
Posted: Sunday, Oct. 14, 2007 04:06 pm
Okay I didn't test this because I am really busy as of now, but I think it should work:

First make a trigger and give it these values:

key:targetname
value: badguytrig

Next make an enemy ai and check forcespawn, undeletable, and spawn and give him these values:

key:targetname
value:badguy

Don't attach him to the trigger to spawn him, you will spawn him through the script!

Next make a friendly ai and give him these values:

key:targetname
value:goodguy

Finally place a node where you want him to run to. This can be any action node or even a pathnode and give it these values:

key:targetname
value:goodguynode

Now try this untested script that I quickly made and hope will work:

Code:
main()
{
maps\_load::main();

thread hitandrun();
}
hitandrun()
{

badguytrig = getent ("badguytrig", "targetname");
level.badguy= getent("badguy", "targetname");

badguytrig waittill("trigger",other);
level.badguy dospawn();

level.badguy waittill("death");

level.goodguy = getent("goodguy", "targetname");

node = getnode ("goodguynode","targetname");
level.goodguy.goalradius = 1;
level.goodguy setgoalnode (node);
}
Share |
Carl21221
General Member
Since: Apr 13, 2006
Posts: 134
Last: Jul 31, 2015
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Sunday, Oct. 14, 2007 05:05 pm
Ace, i followed what you advised. The scipt works for the enemy ai but not my ally. Maybe theres a fault somewhere in the middle?
Share |
TheModDoctor
General Member
Since: Apr 27, 2007
Posts: 174
Last: Jan 10, 2009
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Sunday, Oct. 14, 2007 07:00 pm
Don't know if this maybe works for the goodguy but try it...

level.goodguy notify("stop updating goalpos");
level.goodguy setgoalnode( node );
level.goodguy.goalradius = node.radius;
Share |
94sniper
General Member
Since: Jun 15, 2007
Posts: 907
Last: Jun 22, 2009
[view latest posts]
Level 7
Category: CoD2 SP Mapping
Posted: Monday, Oct. 15, 2007 12:56 am
I found this line in the sewer script and it caught my eye... don't know if it works

level waittill ("enemy died");

I'm gonna replay the level and see where it would fit in.
Share |
94sniper
General Member
Since: Jun 15, 2007
Posts: 907
Last: Jun 22, 2009
[view latest posts]
Level 7
Category: CoD2 SP Mapping
Posted: Monday, Oct. 15, 2007 01:25 am
try this:

Code:
main()
{
thread allies_move();
}

allies_move()
{
aitrig=getent("AItrigger", "targetname");
axis=getent("axis", "classname");

	{
	waittill(axis.health=(0));

	aitrig("trigger");
	}
}


not sure if that will work but give it a go!
Share |
Restricted Access Topic is Locked 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

»