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
Aweno Offline
Junior Member

Posts: 4
Threads: 2
Joined: Nov 2011
Reputation: 0
#3
RE: Amnesia Editor: Scripting

(11-25-2011, 11:30 PM)Statyk Wrote:
(11-25-2011, 10:59 PM)Aweno Wrote: 'And here's my apparently useless piece of script:

// ON EXAMINING THE DOOR'S SPACE BELOW THE DOOR
void OnLoadMap()
{
SetEntityCallbackFunc("tinderbox_lookbelow", "OnPickup");
}


void OnPickup(string &in asEntity, string &in type)
{
FadePlayerRollTo(50, 220, 220);
MovePlayerHeadPos(1.7, 0.03, 0.0, 0.5, 0.2);
PlaySoundAtEntity("drag_dirt", "03_drag_dirt", "Player", 0, false);
}


'If you can assist me, 'please share that with me, I'd really like to continue this map, 'it looks good, so far.

-Thank YOU for your time. ;'3


I did a script like this on my Sciophobia campaign. Normal head position is 0. to go DOWN, you need to set the value from -0.01f to -1.5f (if set lower, the view goes through the floor)...
Go into the Entity tab of the tinderbox and fill in the PlayerInteractCallback as: "tindypick1" and replace your "OnPickup" with this:

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


'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...!
(This post was last modified: 11-26-2011, 03:11 PM by Aweno.)
11-26-2011, 03:09 PM
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)