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 script help!
theodorg Offline
Junior Member

Posts: 44
Threads: 11
Joined: Aug 2013
Reputation: 0
#31
RE: Amnesia script help!

(03-22-2014, 12:39 AM)valetheimpaler Wrote: is the wall static? I understand that you cant regularily activate/deactivate static objects
use model editor, and convert a copy of it to an entity
then replace the version in-game with the .ent for the modded wall
hope this helps

Okay i found the error it was just a simple matter of misspelling now the wall works fine. I could use some help with a script to remove the wall thou. That would be helpful! And thanks for your help!
03-22-2014, 01:23 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#32
RE: Amnesia script help!

Remove the wall? What about SetEntityActive with false?

03-22-2014, 02:45 AM
Find
theodorg Offline
Junior Member

Posts: 44
Threads: 11
Joined: Aug 2013
Reputation: 0
#33
Smile  RE: Amnesia script help!

(03-22-2014, 02:45 AM)Mudbill Wrote: Remove the wall? What about SetEntityActive with false?

Oh yes of course! Sry im new to this and thanks so much!Big Grin

(03-22-2014, 02:45 AM)Mudbill Wrote: Remove the wall? What about SetEntityActive with false?

I did as you said but it dosen't work. The wall spawn but never goes away.
This is the script:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Awesome_key", "Awesome_door", "ABC", true);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddUseItemCallback("", "secret_key", "secret_door", "SECRET", true);
AddEntityCollideCallback("Player", "servant_grunt_1", "MonsterAway", true, 1);
}

void ABC(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked( "Awesome_door", false, true);
PlaySoundAtEntity("", "unlock_door", "Awesome_door", 0, false);
RemoveItem("Awesome_key");
}

void SECRET(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked( "secret_door", false, true);
PlaySoundAtEntity("", "unlock_door", "secret_door", 0, false);
RemoveItem("secret_key");
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
SetEntityActive("popup_wall_1", true);
}

void MonsterAway(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("popup_wall_1", false);
}
(This post was last modified: 03-22-2014, 05:28 PM by theodorg.)
03-22-2014, 05:16 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#34
RE: Amnesia script help!

I don't think you can use the collision event with the player and the monster, because since it is a poofer, it disappears just before it collides with you. The event is never called.

03-22-2014, 07:02 PM
Find
theodorg Offline
Junior Member

Posts: 44
Threads: 11
Joined: Aug 2013
Reputation: 0
#35
RE: Amnesia script help!

(03-22-2014, 07:02 PM)Mudbill Wrote: I don't think you can use the collision event with the player and the monster, because since it is a poofer, it disappears just before it collides with you. The event is never called.

Ok i fixed it now but i have one more question that i didnt find an answer on your youtube channel.

AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1); <---- what does the (1) mean at the end of this sentence?
03-23-2014, 12:16 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#36
RE: Amnesia script help!

Inb4 Mudbill :3

The 1 indicates a state of collision, it can be 1, 0 or -1.

1 - Upon colliding with the object
0 - Both
-1 - Upon leaving the object you collided with

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 03-23-2014, 12:57 AM by Romulator.)
03-23-2014, 12:57 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#37
RE: Amnesia script help!

That number can be either 1, 0 or -1. 1 = Event is executed as you enter the area, -1 = Executed as you leave the area, 0 = both. 0 does the same as 1 if the boolean before is set to true. If false, the event happens twice as you walk through the area.

Edit: Ninja'd. Hue.

(This post was last modified: 03-23-2014, 12:59 AM by Mudbill.)
03-23-2014, 12:59 AM
Find




Users browsing this thread: 1 Guest(s)