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

Members Online

»
0 Active | 6 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

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 4
Category: CoD4 SP Mapping
CoD 4 mapping and level design for single player.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: ai nodes
RollinHard
General Member
Since: Jun 7, 2006
Posts: 24
Last: Feb 22, 2010
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Thursday, Jul. 10, 2008 02:24 pm
Which would be an easy way(scripted) to start a thread (sound,anim,whatever..) if my ai reached a certain node?

info:
- i hit my ai-trigger and my ai goes to the defined node
- if the ai reached this node i want to play a sound for example or start another thread
- i tried several ways with targetnames or flags[ohwell]
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD4 SP Mapping
Posted: Thursday, Jul. 10, 2008 02:56 pm
There are a few way, lets start with scripting the movement and this is assuming you have basic knowledge or nodes and scripting.

Ok so scripted or not you will need to place goal node of your actor in the map so in radiant lets place a 'cover_crouch' or whatever one you need.

Between your actor and node you must obviously have a path set down.

Now your goal node needs a targetname, so with it selected hit 'N' type 'targetname' as the key and 'node1' as the value.

For this to work you will also have to have your ai set up for scripting, lets say you have cpt price in your map.

First you must grab the node.
price_node = getnode ("node1","targetname");

Now you must set the actor this node as a goal.
level.price setgoalnode(price_node);

Now waittill the actor reaches this node.
level.price waittill("goal");

To get this to work you can either use a trigger to call this in a seperate thread for each move, or add waittill("trigger"); commands where needed.

{
playertrig = getent("player_trig", "targetname");
playertrig waittill("trigger");
thread move1
}
move1
{
price_node = getnode ("node1","targetname");
level.price setgoalnode(price_node);
level.price waittill("goal");
}
Share |
RollinHard
General Member
Since: Jun 7, 2006
Posts: 24
Last: Feb 22, 2010
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Thursday, Jul. 10, 2008 03:37 pm
thanks a lot rasta it works...i found a way and i just missed the idea to start the scripting from the player-ai-trigger...the trigger got a targetname now and i can handle the function on the ai-path via the script[casanova]
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 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

»