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 Weeping Angel enemies
CarnivorousJelly Offline
Posting Freak

Posts: 1,196
Threads: 41
Joined: Dec 2012
Reputation: 80
#4
RE: Weeping Angel enemies

(06-19-2013, 04:30 AM)lizardrock17 Wrote: Hello people; I am fairly new to scripting with Amnesia but I would like to create enemies like the Weeping Angels from Doctor Who (Weeping Angels are enemies that can't move when you see them but move when you don't even if your looking at them in the dark and just roam around if they cant find you like if your behind a door). I figured out what engine scripts to use but don't know how to use the script areas for this reason. I was thinking about putting script areas inside of script areas but i don't know if that would would work. I would appreciate some ideas/solutions on how to accomplish this task.

Weeping Angels were terrifying! Traggey might know how to do this (I believe he was working on a Dr Who CS a looooooong time ago). Also, if you need a TARDIS, check out this one!

There was a custom story a little while ago that did something similar with the Brute, but I think they were referencing Schrodinger's Cat. I'm not sure which custom story it was, but Cry definitely played it a while ago, so if you want to check his videos, find it, download the game, and check the script to figure out what they did, that would probably be the best way to go. I'm not going to do that for you because I'm just really tired and really busy :p

Anyways, the script should look something like this for yours:
PHP Code: (Select All)
void OnStart()
{
SetEntityPlayerLookAtCallback("angel_statue_1""WeepingAngel_1"true);
}

//"angel_statue_1" is the name of the statue in the level editor
//"WeepingAngel" is the name of your script that will be called when the player is looking/not looking
//true means the script won't be called again after the player looks at
//the angel once. I'm using this one because you're probably going to
//have to use multiple statues with angel_statue_1 being your first statue

void WeepingAngel_1(string &in asEntityint alState
{
if(
alState == 1//1 means looking
{
//Your angles don't do anything when you're looking at them, so leave this blank
}
else if(
alState == -1)//-1 means not looking
{
SetEntityActive("angel_statue_1"false); //this gets rid of the original one
SetEntityActive("angel_statue_2"true); //this puts in the new one
SetEntityPlayerLookAtCallback("angel_statue_2""WeepingAngel_2"true);
//This callback makes sure that angles keep showing up
}


You can find the majority of scripts on the Engine Scripts page of the wiki. Of course, they can be a little confusing sometimes, so don't be afraid to ask for help!

I'm not sure how you would ensure that the angels appear closer to the player (unless you're using a hallway) or how you would ensure that the angel actually causes harm to/kills the player. I'm not a strong scripter at all, so you might want verification on this :)

Also, since you seem new to this (please don't hurt me for possibly being incorrect): you might want to download and use either Geany or Notepad++ instead of Notepad for scripting if you haven't already downloaded a decent program.

Once that's done, change the language to C++. In Notepad++, this can be done by going under the languages tab in the top menu bar. This will cause strings to appear grey, floats and integers to appear orange, side-notes to appear green, and bools to appear blue. This is helpful for when you get the annoying "Unexpected End of File" error because you'll see a colour that doesn't match up (usually).

Either way, good luck!

[Image: quote_by_rueppells_fox-d9ciupp.png]
(This post was last modified: 06-19-2013, 06:00 AM by CarnivorousJelly.)
06-19-2013, 05:54 AM
Find


Messages In This Thread
Weeping Angel enemies - by lizardrock17 - 06-19-2013, 04:30 AM
RE: Weeping Angel enemies - by Tomato Cat - 06-19-2013, 05:22 AM
RE: Weeping Angel enemies - by lizardrock17 - 06-19-2013, 05:31 AM
RE: Weeping Angel enemies - by CarnivorousJelly - 06-19-2013, 05:54 AM
RE: Weeping Angel enemies - by DeAngelo - 06-19-2013, 10:36 AM
RE: Weeping Angel enemies - by Adrianis - 06-19-2013, 03:08 PM
RE: Weeping Angel enemies - by lizardrock17 - 06-19-2013, 05:01 PM
RE: Weeping Angel enemies - by Adrianis - 06-19-2013, 05:41 PM
RE: Weeping Angel enemies - by lizardrock17 - 06-19-2013, 05:57 PM
RE: Weeping Angel enemies - by OriginalUsername - 06-19-2013, 06:59 PM
RE: Weeping Angel enemies - by 7heDubz - 06-20-2013, 04:00 AM
RE: Weeping Angel enemies - by OriginalUsername - 06-20-2013, 06:54 AM
RE: Weeping Angel enemies - by 7heDubz - 06-20-2013, 07:18 AM
RE: Weeping Angel enemies - by OriginalUsername - 06-20-2013, 07:36 AM
RE: Weeping Angel enemies - by 7heDubz - 06-20-2013, 07:40 AM
RE: Weeping Angel enemies - by Adrianis - 06-20-2013, 12:57 PM
RE: Weeping Angel enemies - by lizardrock17 - 06-20-2013, 04:02 PM
RE: Weeping Angel enemies - by lizardrock17 - 06-20-2013, 07:14 PM
RE: Weeping Angel enemies - by lizardrock17 - 06-21-2013, 12:45 AM
RE: Weeping Angel enemies - by PutraenusAlivius - 06-21-2013, 03:42 AM
RE: Weeping Angel enemies - by lizardrock17 - 06-21-2013, 03:46 AM
RE: Weeping Angel enemies - by CarnivorousJelly - 06-21-2013, 05:17 AM
RE: Weeping Angel enemies - by PutraenusAlivius - 06-21-2013, 05:52 AM
RE: Weeping Angel enemies - by lizardrock17 - 06-21-2013, 02:59 PM
RE: Weeping Angel enemies - by Adrianis - 06-21-2013, 05:47 PM



Users browsing this thread: 1 Guest(s)