Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Amnesia Editor: Scripting
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#4
RE: Amnesia Editor: Scripting

(11-26-2011, 03:09 PM)Aweno Wrote: 'Oh, shit - thanks, brohanovic - it works...! 'Thanks alot, 'right now, 'I'm just set to-- how do I make him rotate normally? 'Daniel spites around the axis like a cogwheel, 'I guess that's just how it works, 'unless I'm able to change the 'FadePlayerRollTo'. I don't know how to fix that, 'but - thanks for the help, I really appreciate that. 'C'y'all, 'and've fun. Big Grin



'And, how do I freeze the player to prevent him/her from waddling off somewhere else in the tunnel, 'unfreezing the player once he/she picks up the crowbar...? 'Thanks...!
"Waddling" made me laugh. Anyway, you have to use SetPlayerActive(true/false); .... Let me try to script this. also add to the fall script.

//__________________________

void tindypick1(string &in asEntity)
{
SetPlayerActive(false);
StartPlayerLookAt("doorcrowbar", 2, 2, "");
FadePlayerRollTo(50, 3, 5);
MovePlayerHeadPos(1.7, -1.5f, 0.0, 1, 0.3);
PlaySoundAtEntity("drag_dirt", "03_drag_dirt", "Player", 0, false);
}

//__________________________

Go into the editor and go to the PlayerInteractCallback of the crowbar and put in "crowpick1". Then change the crowbar's NAME to "doorcrowbar" and add this to your script:


//__________________________

void crowpick1(string &in asEntity)
{
StopPlayerLookAt();
SetPlayerActive(true);
FadePlayerRollTo(0, 3, 5);
MovePlayerHeadPos(0, 0, 0, 1, 0.3);
}

//__________________________

so in the end, it looks like this:

void tindypick1(string &in asEntity)
{
SetPlayerActive(false);
StartPlayerLookAt("doorcrowbar", 2, 2, "");
FadePlayerRollTo(50, 3, 5);
MovePlayerHeadPos(1.7, -1.5f, 0.0, 1, 0.3);
PlaySoundAtEntity("drag_dirt", "03_drag_dirt", "Player", 0, false);
}

void crowpick1(string &in asEntity)
{
StopPlayerLookAt();
SetPlayerActive(true);
FadePlayerRollTo(0, 3, 5);
MovePlayerHeadPos(0, 0, 0.0, 1, 0.3);
}



I did this exact thing in my map, "Sciophobia" =P haha
(This post was last modified: 11-27-2011, 02:03 AM by Statyk.)
11-27-2011, 02:01 AM
Find


Messages In This Thread
Amnesia Editor: Scripting - by Aweno - 11-25-2011, 10:59 PM
RE: Amnesia Editor: Scripting - by Statyk - 11-25-2011, 11:30 PM
RE: Amnesia Editor: Scripting - by Aweno - 11-26-2011, 03:09 PM
RE: Amnesia Editor: Scripting - by Statyk - 11-27-2011, 02:01 AM



Users browsing this thread: 1 Guest(s)