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

Members Online

»
0 Active | 7 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 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Animation Error: "Not an Actor"
Tim451
General Member
Since: Feb 22, 2005
Posts: 771
Last: May 28, 2009
[view latest posts]
Level 7
Category: CoD4 MP Mapping
Posted: Wednesday, May. 27, 2009 12:03 pm
I've got a doorway that i'd like an actor to walk past, perform an animation, then vanish (going for a creepy style map). I've got an actor set up as a spawner with a targetname "ghost1" and a scripted node with the targetname "ghost1_look" where I want the animation to be performed. I keep getting a "Not an Actor" error when I try to run the level. I have a spawned patroller & a spawned dog working flawlessly but I can't seem to get this one to work. My code is below:

main gsc file:
Code:

#include maps\_utility;

#include maps\_anim;

#include common_scripts\utility;

#include animscripts\utility; 

#include maps\_patrol;

#using_animtree( "generic_human" );

main()

{

  maps\_load::main();
  maps\tunnel_fx::main();
  maps\createfx\tunnel_fx::main();
  maps\tunnel_anim::main();

  VisionSetNaked( "tunnel" );
  
  maps\_load::set_player_viewhand_model
  ( "viewhands_player_sas_woodland" );

  setExpFog(500, 3500, .1, .125, .14, 0);
  
  level.player takeallweapons();
  level.player giveWeapon( "m4_grunt" );
  level.player giveWeapon( "usp" );
  level.player giveWeapon( "flash_grenade" );
  level.player switchToWeapon( "m4_grunt" );

  patroller1 = getent( "patroller1", "targetname" );
  patroller1 thread add_spawn_function( maps\_patrol::patrol, self.target );

  thread doorghost1();

}


doorghost1()

{

  doorghost = getent("ghost1","targetname");
  doorghost.animname = "smoker";
  smokenode = getnode("ghost1_look","targetname");

  doorghost setgoalnode(smokenode);
  doorghost waittill("goal");
  smokenode anim_reach_solo(doorghost,"smoke_idle");
  smokenode anim_single_solo(doorghost,"smoke_idle");
  self delete(); 

}


anim gsc file:
Code:

#include maps\_utility;

#include maps\_anim;

#include common_scripts\utility;

#include animscripts\utility;


#using_animtree( "generic_human" );

main()

{

  level.scr_anim[ "smoker" ][ "smoke_idle" ] = %patrol_bored_idle_smoke;

  level.scr_anim[ "generic" ][ "patrol_walk" ]            = %patrol_bored_patrolwalk;
  level.scr_anim[ "generic" ][ "patrol_walk_twitch" ]     = %patrol_bored_patrolwalk_twitch;
  level.scr_anim[ "generic" ][ "patrol_stop" ]            = %patrol_bored_walk_2_bored;
  level.scr_anim[ "generic" ][ "patrol_start" ]           = %patrol_bored_2_walk;
  level.scr_anim[ "generic" ][ "patrol_turn180" ]         = %patrol_bored_2_walk_180turn;

  level.scr_anim[ "generic" ][ "patrol_idle_1" ]          = %patrol_bored_idle;
  level.scr_anim[ "generic" ][ "patrol_idle_2" ]          = %patrol_bored_idle_smoke;
  level.scr_anim[ "generic" ][ "patrol_idle_3" ]          = %patrol_bored_idle_cellphone;
  level.scr_anim[ "generic" ][ "patrol_idle_4" ]          = %patrol_bored_twitch_bug;
  level.scr_anim[ "generic" ][ "patrol_idle_5" ]          = %patrol_bored_twitch_checkphone;
  level.scr_anim[ "generic" ][ "patrol_idle_6" ]          = %patrol_bored_twitch_stretch;  

  level.scr_anim[ "generic" ][ "patrol_idle_smoke" ]      = %patrol_bored_idle_smoke;
  level.scr_anim[ "generic" ][ "patrol_idle_checkphone" ] = %patrol_bored_twitch_checkphone;
  level.scr_anim[ "generic" ][ "patrol_idle_stretch" ]    = %patrol_bored_twitch_stretch;

}


It's probably something simple that I've overlooked but I've tried everything I can think of. Any ideas?

Cheers!
Share |
Tim451
General Member
Since: Feb 22, 2005
Posts: 771
Last: May 28, 2009
[view latest posts]
Level 7
Category: CoD4 MP Mapping
Posted: Thursday, May. 28, 2009 10:42 am
Any ideas guys? I'm really struggling with this one.
Share |
SparkyMcSparks
General Member
Since: Feb 28, 2004
Posts: 1713
Last: Dec 29, 2016
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Thursday, May. 28, 2009 11:01 am
Code:
doorghost = getent("ghost1","targetname");


Is that an actual AI or a spawner.
Share |
Tim451
General Member
Since: Feb 22, 2005
Posts: 771
Last: May 28, 2009
[view latest posts]
Level 7
Category: CoD4 MP Mapping
Posted: Thursday, May. 28, 2009 11:37 am
It's a spawner. I've set the actor up as a spawner (spawner check box) & linked a trigger_multiple to it to trigger it.

edited on May. 28, 2009 07:40 am by Tim451
Share |
jeannotvb
General Member
Since: Dec 8, 2007
Posts: 620
Last: Feb 1, 2010
[view latest posts]
Level 6
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Thursday, May. 28, 2009 12:56 pm
A spawner is not an actor, remove the trigger and spawn an actor through the spawner with a script:

Use this: DoSpawn();

like so:

Code:

spawner = getEnt( "my_spawner", "targetname" );
myAI = spawner DoSpawn();


myAI will become the name of the spawner actor, you will use this name to call the AI in script so use myAI.

For example:

Code:

myAI.animname = 


He will not spawn if you can see him, if you want it to spawn even if you can see him then replace DoSpawn with StalingradSpawn.

edited on May. 28, 2009 08:57 am by jeannotvb

edited on May. 28, 2009 08:58 am by jeannotvb
Share |
Tim451
General Member
Since: Feb 22, 2005
Posts: 771
Last: May 28, 2009
[view latest posts]
Level 7
Category: CoD4 MP Mapping
Posted: Thursday, May. 28, 2009 02:25 pm
Ok cheers for that, I've got him spawning now. How can I use the script to make him spawn only when I near the doorway? Currently he spawns, does his thing, then deletes before I get anywhere near it. I want the effect to be that when the player nears the doorway he moves into view, does his animation, then vanishes.

This is the "doorghost1" thread as it stands:
Code:

doorghost1()

{

  spawner = getent("ghost1","targetname");
  ghostspawn = spawner StalingradSpawn();
  ghostspawn.animname = "smoker";
  smokenode = getnode("ghost1_look","targetname");
  ghostspawn setgoalnode(smokenode);
  ghostspawn waittill("goal");
  smokenode anim_reach_solo(ghostspawn,"smoke_idle");
  smokenode anim_single_solo(ghostspawn,"smoke_idle");
  //ghostspawn delete(); 

}


I commented out the "ghostspawn delete();" line for now so I could ensure he was spawning correctly, which he is.

Cheers

edited on May. 28, 2009 10:29 am by Tim451
Share |
techno2sl
General Member
Since: Aug 5, 2004
Posts: 2977
Last: Oct 14, 2010
[view latest posts]
Level 9
Category: CoD4 MP Mapping
Posted: Thursday, May. 28, 2009 03:04 pm
Code:

doorghost1()

{
  
  spawner = getent("ghost1","targetname");
  trig = getent("trig_ghost", "targetname);

  trig waittill("trigger)

  ghostspawn = spawner StalingradSpawn();
  ghostspawn.animname = "smoker";
  smokenode = getnode("ghost1_look","targetname");
  ghostspawn setgoalnode(smokenode);
  ghostspawn waittill("goal");
  smokenode anim_reach_solo(ghostspawn,"smoke_idle");
  smokenode anim_single_solo(ghostspawn,"smoke_idle");
  //ghostspawn delete(); 
}


So add a trigger (most likely a trigger_multiple) with a targetname of "trig_ghost".

Not sure if that will work as I have no knowledge of scripting [drink]
Share |
Tim451
General Member
Since: Feb 22, 2005
Posts: 771
Last: May 28, 2009
[view latest posts]
Level 7
Category: CoD4 MP Mapping
Posted: Thursday, May. 28, 2009 10:27 pm
Works like a charm :)

Cheers guys
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 MP 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

»