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

Members Online

»
0 Active | 10 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: Only Allies Move
Marty22
General Member
Since: Jan 2, 2008
Posts: 42
Last: Sep 17, 2011
[view latest posts]
Level 2
Category: CoD4 SP Mapping
Posted: Tuesday, Mar. 9, 2010 11:18 pm
Hi, as before, I've had problems with actor movement, but it solved itself with a wait(); command for some reason. This time I'm trying to make a civilian move, but he just stands still. The weird thing is, if I change the civilian to an ally, it works. The civilian actors won't work neither will the enemy actors if inserted.

Here's a thread I made some time ago on the same topic:
http://modsonline.com/Forums-top-110552.html

There a wait(); command worked, but it would be nice to get a better fix on the problem.

And I'm definitely sure it's scripted correctly, as I've done it before, but I'll post it anyway:
Code:
node = getnode( "node", "targetname" );
node2 = getnode( "node2", "targetname" );
civilian = scripted_spawn2( "civilian", "targetname", true);

civilian setgoalnode(node);
civilian waittill("goal");
civilian setgoalnode(node2);


Could the AI be bugged, or am I missing something?[confused]

Btw I use XP.
Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoD4 SP Mapping
Posted: Wednesday, Mar. 10, 2010 12:03 am
try changing the spawning method to something like this:

Code:


civilian = getent( "civilian", "targetname" );
level.civ_guy = civilian stalingradspawn();



that should allow you to control your ai as an actor and make him go wherever you want him to go. This should also apply to the enemies and watnot. I used to have the same problem and spawning the ai's in that method allowed me to take full control of them. Try it and let me know how that goes. of course now whenever you want to call out ur ai you have to use "level.civ" on any thread beyond the point of its spawn.
Share |
Marty22
General Member
Since: Jan 2, 2008
Posts: 42
Last: Sep 17, 2011
[view latest posts]
Level 2
Category: CoD4 SP Mapping
Posted: Wednesday, Mar. 10, 2010 10:22 pm
Thanks for quick response.
I've tried that script before, but it didn't work. It's only the ally that will move.

Edit: Just found out, that if I link the actor directly to the node, it works. But I was hoping for a scripting solution.
Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoD4 SP Mapping
Posted: Wednesday, Mar. 10, 2010 11:52 pm
ive never had an issue with that scripting and ive seen it done in stock maps as well. I wonder wat went wrong with yours.
Share |
Marty22
General Member
Since: Jan 2, 2008
Posts: 42
Last: Sep 17, 2011
[view latest posts]
Level 2
Category: CoD4 SP Mapping
Posted: Sunday, Mar. 14, 2010 11:13 pm
I took the map "test" and changed it to spawn a civilian and then move via script, just like in my map, and this time the civilian moved.

So, I guess somethings wrong with my script. I'll look through it, and see if I can find the problem.
Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoD4 SP Mapping
Posted: Monday, Mar. 15, 2010 05:04 am
sounds like a plan. cause like i said ive never had an issue with that script that i provided a few posts above. Not to mention its been used in stock maps as well. hope you find your answer pretty soon. gl and wish you well.
Share |
Marty22
General Member
Since: Jan 2, 2008
Posts: 42
Last: Sep 17, 2011
[view latest posts]
Level 2
Category: CoD4 SP Mapping
Posted: Tuesday, Mar. 16, 2010 08:14 pm
Thanks,
I did make it work actually, and I think it was the hiding_door script that was running all the time.

Anyway, thanks for your help and taking the time.
Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoD4 SP Mapping
Posted: Tuesday, Mar. 16, 2010 11:41 pm
if that door was a script_brushmodel then you would have to connect the paths via script. Usually script brushmodels will do that.( prevent your ai from moving foward ). also dont forget to check the box thats on the script brushmodel when you press N ( while having it selected ).
Share |
Marty22
General Member
Since: Jan 2, 2008
Posts: 42
Last: Sep 17, 2011
[view latest posts]
Level 2
Category: CoD4 SP Mapping
Posted: Saturday, Mar. 20, 2010 12:09 am
Actually my actor is at a completely different spot.

And for the conclusion of this I think it was because, again, I needed a wait function. Don't know why I need that, I just do.

Thanks for the help though[thumbs_up]
Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoD4 SP Mapping
Posted: Saturday, Mar. 20, 2010 12:12 am
aights
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

»