Jump to content

Home

Scripts: Affecting the Player


AKPiggott

Recommended Posts

I'm confused by this. All the Raven scripts use the player targetname as "Kyle". I've tried this in my scripts, but it doesn't work unless I give the scriptrunner the "run on activator" flag. However, when I do this, it stops scripts from working that are supposed to affect multiple entities (like cutscenes). Can someone please explain this to me?

Link to comment
Share on other sites

OK. Let me be more specific. I have a cutscene that works perfectly. All that I need is for the player to teleport to the representing NPC at the end of it. Here's what I've got:

 

affect ( "kyle", /*@AFFECT_TYPE*/ FLUSH )

{

set ( <SET_TYPES>/ "SET_ORIGIN", $tag( "cs1_mace1", ORIGIN)$ );

}

 

It works in all of Raven's scripts, just not mine. What am I doing wrong?

Link to comment
Share on other sites

Originally posted by Emon

Does the player entity have the scripttargetnamethingy or whatever it's called, set to "kyle"?

 

Raven's levels don't have such a key assigned to the "info_player_start". The whole thing is completely baffling me.

 

I'll try Massassi Emon, cheers.

Link to comment
Share on other sites

I've got a script working that moves the player at the end of the script. I used the exact same syntax (you are right to use 'kyle') except that the position refers to a ref tag rather than a player- just like using cameras.

 

I think if you want to use the position of another NPC a get operation would have to be used, but I haven't tried that myself.

Link to comment
Share on other sites

Originally posted by Emon

Actually, I just realized... Are you trying to control the actual player entity, or did you insert the "kyle" NPC? There's an NPC of Kyle for cutscenes, maybe you have to use that.

 

No, I'm not animating the player entity for the cutscenes if that's what you mean. I'm doing it for a seperate NPC. I just want to telelport the player to Kyle's position at the end of a cutscene. Otherwise, the cutscene is finished and the player is still at the point where he triggered it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...