Aweno
Junior Member
Posts: 4
Threads: 2
Joined: Nov 2011
Reputation:
0
|
'Decay' Custom Story: HELP
'Hey, y'all - again, 'I'm new to Frictional Games' forums, 'and I'm pleased with the immediate assistance on my last (first) thread. 'I'd solved that issue with my last post, 'thanks for the helpful information provided by Statyk. 'The link's below, 'but I've scrapped the idea of a crowbar referring to my need of advance in my map, 'but, this time, I'm set to make the player bend down and check the empty space between the door to find a wooden beam (I'd solved the player-checking-below-the-door thing in my previous thread) behind the door and knock it over to possibly hit three script-areas surrounding the wood beam which'd unlock the door, 'cause - technically, the beam was blocking the door from opening, 'and in the script'd unlock the door, WHICH IS NAMED 'cellar_1' IN MY SCRIPT.
'Here's the piece of script I need to fix:
// ON EXAMINING THE DOOR'S SPACE BELOW THE DOOR
void OnLoadMap()
{
SetEntityCallbackFunc("tinderbox_lookbelow", "OnPickup");
AddEntityCollideCallback("ScriptArea_2", "wood_beam_1", "SetSwingDoorLocked", false, 0);
AddEntityCollideCallback("ScriptArea_3", "wood_beam_1", "SetSwingDoorLocked", false, 0);
AddEntityCollideCallback("ScriptArea_4", "wood_beam_1", "SetSwingDoorLocked", false, 0);
}
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);
SetPlayerJumpDisabled(true);
SetPlayerCrouchDisabled(true);
ChangePlayerStateToNormal();
SetPlayerCrouching(false);
FadeRadialBlurTo(0.10, 2);
SetMessage("MessageCategory", "MessageEntry", 5);
}
void SetSwingDoorLocked(string &in asParent, string &in asChild, int alState)
{
FadePlayerRollTo(0.0f, 33.0f, 33.0f);
MovePlayerHeadPos(0, 0, 0, 1, 0.5f);
PlaySoundAtEntity("drag_dirt", "03_drag_dirt", "Player", 0, false);
PlayMusic("27_puzzle_passage", false, 1.0f, 5, 0, true);
SetPlayerJumpDisabled(false);
SetPlayerCrouchDisabled(false);
FadeRadialBlurTo(0.0, 1);
CreateParticleSystemAtEntity("beamps", "ps_break_wood.ps", "cellar_1", false);
SetSwingDoorLocked("cellar_1", false, false);
void GiveSanityBoostSmall();
}
'I need some serious help with this. What's wrong with my script? 'When the wooden beam hits one of the scripted boxes the player's supposed to return to normal view and stand back up, 'and then the door's supposed to be unlocked, 'and with the music, the sanity-boost, 'the particle-effect... I can't see any of this! I don't understand what I'm not doing right. 'If you can, correct my script for me, I don't know what's wrong 'I really appreciate ANY help, 'thanks.
HERE is my last post. http://www.frictionalgames.com/forum/thread-11502.html
|
|
11-27-2011, 01:20 AM |
|
Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
RE: 'Decay' Custom Story: HELP
(11-27-2011, 01:20 AM)Aweno Wrote: 'Hey, y'all - again, 'I'm new to Frictional Games' forums, 'and I'm pleased with the immediate assistance on my last (first) thread. 'I'd solved that issue with my last post, 'thanks for the helpful information provided by Statyk. 'The link's below, 'but I've scrapped the idea of a crowbar referring to my need of advance in my map, 'but, this time, I'm set to make the player bend down and check the empty space between the door to find a wooden beam (I'd solved the player-checking-below-the-door thing in my previous thread) behind the door and knock it over to possibly hit three script-areas surrounding the wood beam which'd unlock the door, 'cause - technically, the beam was blocking the door from opening, 'and in the script'd unlock the door, WHICH IS NAMED 'cellar_1' IN MY SCRIPT.
'Here's the piece of script I need to fix:
// ON EXAMINING THE DOOR'S SPACE BELOW THE DOOR
void OnLoadMap()
{
SetEntityCallbackFunc("tinderbox_lookbelow", "OnPickup");
AddEntityCollideCallback("ScriptArea_2", "wood_beam_1", "SetSwingDoorLocked", false, 0);
AddEntityCollideCallback("ScriptArea_3", "wood_beam_1", "SetSwingDoorLocked", false, 0);
AddEntityCollideCallback("ScriptArea_4", "wood_beam_1", "SetSwingDoorLocked", false, 0);
}
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);
SetPlayerJumpDisabled(true);
SetPlayerCrouchDisabled(true);
ChangePlayerStateToNormal();
SetPlayerCrouching(false);
FadeRadialBlurTo(0.10, 2);
SetMessage("MessageCategory", "MessageEntry", 5);
}
void SetSwingDoorLocked(string &in asParent, string &in asChild, int alState)
{
FadePlayerRollTo(0.0f, 33.0f, 33.0f);
MovePlayerHeadPos(0, 0, 0, 1, 0.5f);
PlaySoundAtEntity("drag_dirt", "03_drag_dirt", "Player", 0, false);
PlayMusic("27_puzzle_passage", false, 1.0f, 5, 0, true);
SetPlayerJumpDisabled(false);
SetPlayerCrouchDisabled(false);
FadeRadialBlurTo(0.0, 1);
CreateParticleSystemAtEntity("beamps", "ps_break_wood.ps", "cellar_1", false);
SetSwingDoorLocked("cellar_1", false, false);
void GiveSanityBoostSmall();
}
'I need some serious help with this. What's wrong with my script? 'When the wooden beam hits one of the scripted boxes the player's supposed to return to normal view and stand back up, 'and then the door's supposed to be unlocked, 'and with the music, the sanity-boost, 'the particle-effect... I can't see any of this! I don't understand what I'm not doing right. 'If you can, correct my script for me, I don't know what's wrong 'I really appreciate ANY help, 'thanks.
HERE is my last post. http://www.frictionalgames.com/forum/thread-11502.html If there's no crash/error message and the player or nothing is happening to the beam, the problem may be the script areas. move them closer or make sure the names match PERFECTLY. Also, you can't have "void" in the parameters of a function. That won't fix the problem, but you should be crashing because of it.
" void GiveSanityBoostSmall();" at the bottom of the script should be "GiveSanityBoostSmall();".... And if I'm not mistaken, this function needs an amount in it. e.g. GiveSanityBoostSmall(20);.... otherwise, just completely change the function to GiveSanityBoost();
|
|
11-27-2011, 02:12 AM |
|
Aweno
Junior Member
Posts: 4
Threads: 2
Joined: Nov 2011
Reputation:
0
|
RE: 'Decay' Custom Story: HELP
'None - I still can't get it to work, 'I changed the names of the script-areas in respective order to 'fallbeam_2', 'fallbeam_3' and 'fallbeam_4', 'and changed the state to 'Only Enter'. 'I can't get it to work, I rescaled them and moved them closer, 'but, it won't work. 'Could the scripted areas be interferring with the other entities and props I've in my corridor that sides the wooden beam? 'It just gets repetetive, 'I don't feel like scrapping this idea. 'Any advice?
'It works fine in-game, 'and I don't get any lag or crash-messages. 'But I don't understand why the script won't work...
(This post was last modified: 11-27-2011, 01:08 PM by Aweno.)
|
|
11-27-2011, 01:07 PM |
|
Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
RE: 'Decay' Custom Story: HELP
(11-27-2011, 01:07 PM)Aweno Wrote: 'None - I still can't get it to work, 'I changed the names of the script-areas in respective order to 'fallbeam_2', 'fallbeam_3' and 'fallbeam_4', 'and changed the state to 'Only Enter'. 'I can't get it to work, I rescaled them and moved them closer, 'but, it won't work. 'Could the scripted areas be interferring with the other entities and props I've in my corridor that sides the wooden beam? 'It just gets repetetive, 'I don't feel like scrapping this idea. 'Any advice?
'It works fine in-game, 'and I don't get any lag or crash-messages. 'But I don't understand why the script won't work... You have a bunch of wrong function names and issues, I've noticed... I'll try to clear this up for you. Could you repost what you have in your .hps as of right now?
(This post was last modified: 11-27-2011, 10:17 PM by Statyk.)
|
|
11-27-2011, 10:15 PM |
|
|