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
Script Help Dissapearing Wall
Stepper321 Offline
Senior Member

Posts: 263
Threads: 26
Joined: Nov 2011
Reputation: 8
#1
Dissapearing Wall

Hello! I am a medium/beginner in scripting for Amnesia, but i don't know how to make a dissapearing wall and an appearing wall, cause when you walk to an certain place you get a sanity damage of 5 and an earthquacke happens, but i want to remove a wall then. How do you do that Big Grin ?
02-20-2012, 08:10 PM
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#2
RE: Dissapearing Wall

Make wall entity Smile

When Life No Longer Exists
Full-conversion mod
02-20-2012, 08:32 PM
Website Find
GoranGaming Offline
Member

Posts: 183
Threads: 30
Joined: Feb 2012
Reputation: 7
#3
RE: Dissapearing Wall

Well, first you need to name the wall, name it to "WallDissapear" Also make the are that the player collides with. Name it CollideWallDissapear

void OnStart()
{
AddEntityCollideCallback("Player", "CollideWallDissapear", "RemoveWallFunc", true, 1);

}

void RemoveWallFunc(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("WallDissapear", false)
GiveSanityDamage(5, true);
}


This will make the wall dissapear and remove sanity but I don't know how to make a earthquake.

Current projects:

The Dark Prison 85 % (Stopped working on this one)

Unnamed Project 7 %
(This post was last modified: 02-20-2012, 09:47 PM by GoranGaming.)
02-20-2012, 09:46 PM
Website Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#4
RE: Dissapearing Wall

(02-20-2012, 09:46 PM)GoranGaming Wrote: Well, first you need to name the wall, name it to "WallDissapear" Also make the are that the player collides with. Name it CollideWallDissapear

void OnStart()
{
AddEntityCollideCallback("Player", "CollideWallDissapear", "RemoveWallFunc", true, 1);

}

void RemoveWallFunc(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("WallDissapear", false)
GiveSanityDamage(5, true);
}

This will make the wall dissapear and remove sanity but I don't know how to make a earthquake.
This wont remove a wall. Because walls are static objects you first need to convert them to a staticProp(entity) and then create a body so the player wont walk through the wall. Then when you've done that you can remove the walls through scripting


02-20-2012, 09:49 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#5
RE: Dissapearing Wall

I don't know where they are but I found a model pack with all the walls that were entities. Shame I can't find them now.

02-21-2012, 03:21 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Dissapearing Wall

(02-20-2012, 09:49 PM)SilentStriker Wrote: This wont remove a wall. Because walls are static objects you first need to convert them to a staticProp(entity) and then create a body so the player wont walk through the wall. Then when you've done that you can remove the walls through scripting

Actually, they need to be converted to Object::Static entity type.

Tutorials: From Noob to Pro
02-21-2012, 06:53 AM
Website Find




Users browsing this thread: 1 Guest(s)