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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting fatal errors?
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#11
RE: Scripting fatal errors?

Ok, then. Do this:

void Statuescare(string &in asParent, string &in asChild, int alState)

{

StartPlayerLookAt("Statue_1", 75, 100, "");

AddTimer("Scaretimer_1", 3, "STAHP");

}

void STAHP (string &in asTimer)
{
StopPlayerLookAt();
}

This will return the player to be normal.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-14-2012, 05:46 PM
Find Reply
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#12
RE: Scripting fatal errors?

void OnStart()
{
FadeOut(0);
FadeIn(10);
AddEntityCollideCallback("Player", "Studydooropen", "CollideRoomTwo", true, 0);
AddUseItemCallback("", "bedroomkey_1", "mansion_1", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "Statuescare", "Statuescare", true, 1);
AddEntityCollideCallback("Player", "darkmemento", "Darkmemento", true, 1);
AddUseItemCallback("", "stairskey_1", "level_wood_1", "UsedKeyOnDoor_2", true);
SetEntityConnectionStateChangeCallback("button_simple_1", "opendoor_1");
}

void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
AddTimer("Timer_1", 10, "Clearnodes_1");
SetSwingDoorClosed("mansion_2", true, true);
SetSwingDoorLocked("mansion_2", true, true);
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
}

void Clearnodes_1(string &in asTimer)
{
ClearEnemyPatrolNodes("servant_grunt_1");
}


void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("bedroomkey_1");
}

void UsedKeyOnDoor_2(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("level_wood_1", false);
PlaySoundAtEntity("", "unlock_door", "mansion_5", 0, false);
RemoveItem("stairskey_1");
}

void Statuescare(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("Statue_1", 75, 100, "");
AddTimer("Scaretimer_1", 3, "STAHP");
}

void STAHP (string &in asTimer)
{
StopPlayerLookAt();
}

void Darkmemento(string &in asParent, string &in asChild, int alState)
{
AddQuest("darkQuest","DarkQuest");
}

void opendoor_1(string &in asEntity, int alState)
{
SetEntityActive("servant_grunt_2", true);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_11", 0, "");
SetEntityActive("cabinet_metal_1", false);
SetEntityActive("cabinet_metal_2", true);
}

void OnLeave()
{

}

main (79,1) : ERR : Unexpected end of file

Sad

Nevermind, deleted map1_cache and now it works Big Grin! Thanks a lot!

Alright, moar questions: How do I add that sanity loss effect when you see some shit like a pile of bodies and your screen goes all shaky for a moment and your sanity goes down? And how do I get that blue-ish sanity gain effect? I couldn't find it on http://wiki.frictionalgames.com/hpl2/amn..._functions
(This post was last modified: 10-14-2012, 08:27 PM by Rapsis.)
10-14-2012, 08:09 PM
Find Reply
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#13
RE: Scripting fatal errors?

void GiveSanityDamage(float afAmount, bool abUseEffect);

and


void GiveSanityBoost();
void GiveSanityBoostSmall();

Hope that helped.

I rate it 3 memes.
10-15-2012, 01:55 AM
Find Reply
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#14
RE: Scripting fatal errors?

Alright, time to wake up this old, old post.

Is it possible to make some stuff like drawers, small beds, tables etc. push-able? But I don't want ALL of those to be move-able, only some specific ones.
10-26-2012, 10:32 AM
Find Reply
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#15
RE: Scripting fatal errors?

(10-26-2012, 10:32 AM)Rapsis Wrote: Alright, time to wake up this old, old post.

Is it possible to make some stuff like drawers, small beds, tables etc. push-able? But I don't want ALL of those to be move-able, only some specific ones.
Then you must go to the model editor and apply a body to it. Of course, there are a lot of settings to be changed, so... good luck.

And you could make a new thread, this thread is for a script, not for models.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-26-2012, 11:33 AM
Find Reply
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#16
RE: Scripting fatal errors?

(10-26-2012, 11:33 AM)The chaser Wrote:
(10-26-2012, 10:32 AM)Rapsis Wrote: Alright, time to wake up this old, old post.

Is it possible to make some stuff like drawers, small beds, tables etc. push-able? But I don't want ALL of those to be move-able, only some specific ones.
Then you must go to the model editor and apply a body to it. Of course, there are a lot of settings to be changed, so... good luck.

And you could make a new thread, this thread is for a script, not for models.
If I'll have more questions about models I will, but I now I just have one last question about them: Is it possible to use new models for custom stories? Or do I have to make a total conversion?
10-26-2012, 11:37 AM
Find Reply
ZodiaC Offline
Member

Posts: 120
Threads: 8
Joined: Oct 2012
Reputation: 2
#17
RE: Scripting fatal errors?

(10-26-2012, 11:37 AM)Rapsis Wrote: If I'll have more questions about models I will, but I now I just have one last question about them: Is it possible to use new models for custom stories? Or do I have to make a total conversion?
yes it is possible to use new models for custom stories by saving them inside the entities folder.

[Image: 2H1Mc.jpg]
10-26-2012, 12:50 PM
Find Reply
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#18
RE: Scripting fatal errors?

(10-14-2012, 04:36 PM)Rapsis Wrote: Can anyone do this script for me? I tried


void Statuescare(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("Statue_1", 75, 100, "");
AddTimer("Scaretimer_1", 3, "StopPlayerLookAt");
}

But it doesn't work. Not surprised.
Ah, sorry. 3=

I meant call the function with a timer callback. Like how chaser explained.

RAISE YOUR DONGERS ヽ༼ຈل͜ຈ༽ノ
(This post was last modified: 10-26-2012, 03:48 PM by Tomato Cat.)
10-26-2012, 03:47 PM
Find Reply
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#19
RE: Scripting fatal errors?

Alright, now I'm trying to make a skybox, and oh boy am I pissed.
I've been trying to make one for around 4 or 5 hours I think; I have to figure everything out by myself because I can't find any USEFUL tutorials on the internet.
So, I have GIMP with the .dds plugin.
I can't find any single fucking skybox on the internet.
Some tutorials say "Download a .CUBEMAP file from this place, it's FREEEEEEEEEEEEEEEE!":
http://www.cgskies.com/sky.php?sky=338&t...&pagesize=

(I need daytime to add some contrast)
The fucking thing is, THERE IS NO .CUBEMAP FILE, JUST A DAMN JPG OR SOME SOME SHIT LIKE THAT.
Can any one explain this shit like you would explain it to a retard? I don't get this crap AT ALL.
10-26-2012, 04:29 PM
Find Reply
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#20
RE: Scripting fatal errors?

(10-26-2012, 04:29 PM)Rapsis Wrote: Alright, now I'm trying to make a skybox, and oh boy am I pissed.
I've been trying to make one for around 4 or 5 hours I think; I have to figure everything out by myself because I can't find any USEFUL tutorials on the internet.
So, I have GIMP with the .dds plugin.
I can't find any single fucking skybox on the internet.
Some tutorials say "Download a .CUBEMAP file from this place, it's FREEEEEEEEEEEEEEEE!":
http://www.cgskies.com/sky.php?sky=338&t...&pagesize=

(I need daytime to add some contrast)
The fucking thing is, THERE IS NO .CUBEMAP FILE, JUST A DAMN JPG OR SOME SOME SHIT LIKE THAT.
Can any one explain this shit like you would explain it to a retard? I don't get this crap AT ALL.
Caaalm down, Rapsis. You don't need any .CUBEMAP, for what I know. Just a .dds. Any .dds should work. But, remain to choose a big image and that ends with a multiple of 2.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-26-2012, 04:35 PM
Find Reply




Users browsing this thread: 1 Guest(s)