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
Scripting Help
Clear Offline
Junior Member

Posts: 19
Threads: 4
Joined: May 2012
Reputation: 0
#8
RE: Scripting Help

(06-12-2012, 04:37 PM)andyrockin123 Wrote:
(06-12-2012, 04:17 PM)Clear Wrote:
(06-12-2012, 04:11 PM)beecake Wrote: Does the player see it move, or does the player only notice that it HAS moved?
I was thinking the same thing, to make it like a Weeping angel or SCP-173 (You can google it) when you turn around it comes closer and closer and then Bam, you're dead.
But after a while of seeing most of the scripting options i could see it's not possible, but if it is, feel free to share Big Grin

The idea is that the player goes to a certain area wich activates the statue to teleport closer and closer, sorta like a script area, that red one that activates stuffs when you go by pass it, it doesn't really matter if he see it or not =D

Thanks for the reply
You need to have a few of these statues set up, as well as multiple script areas. The easiest way to produce the effect you're looking for is to use the SetEntityActive function multiple times.

Imagine you have several statues lines up, the one in the back being active; when the player collides with a script area, set the one in the back inactive, and the set the one in front of it active, this will give the illusion that the statue's moving. Here's a script off the top of my head (so basically it might not be 100% accurate):


void OnStart()
{
AddEntityCollideCallback("Player", "AreaMoveStatue_1", "CollideAreaMoveStatue_1", true, 1);
AddEntityCollideCallback("Player", "AreaMoveStatue_2", "CollideAreaMoveStatue_2", true, 1);
}

void CollideAreaMoveStatue_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Statue_1", false);
SetEntityActive("Statue_2", true);
}

void CollideAreaMoveStatue_2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Statue_2", false);
SetEntityActive("Statue_3", true);
}
////end script

To make this work, the Script (Red) areas will need to be called "AreaMoveStatue_1" and "AreaMoveStatue_2". The statues will need to be named "Statue_1" "Statue_2" & "Statue_3'. You can keep adding numbers and callbacks as long as you wish. Hope that helped!
That is an amazing idea!
Really creative idea and I'm sure it'll work fine!
One last question if you can, What if i want to make a Moving Brick sound every time the statue "Moves" ?
I Allready have the sound file, .ogg.
Thanks again =D
06-12-2012, 04:57 PM
Find


Messages In This Thread
Scripting Help - by Clear - 06-12-2012, 04:08 PM
RE: Scripting Help - by FlawlessHappiness - 06-12-2012, 04:11 PM
RE: Scripting Help - by Clear - 06-12-2012, 04:17 PM
RE: Scripting Help - by Adny - 06-12-2012, 04:37 PM
RE: Scripting Help - by Clear - 06-12-2012, 04:57 PM
RE: Scripting Help - by FlawlessHappiness - 06-12-2012, 04:38 PM
RE: Scripting Help - by Clear - 06-12-2012, 04:50 PM
RE: Scripting Help - by Datguy5 - 06-12-2012, 06:13 PM
RE: Scripting Help - by FlawlessHappiness - 06-12-2012, 06:14 PM
RE: Scripting Help - by Datguy5 - 06-12-2012, 06:16 PM
RE: Scripting Help - by Adny - 06-12-2012, 06:33 PM
RE: Scripting Help - by Datguy5 - 06-12-2012, 06:38 PM
RE: Scripting Help - by FlawlessHappiness - 06-12-2012, 07:21 PM
RE: Scripting Help - by Adny - 06-12-2012, 04:55 PM
RE: Scripting Help - by FlawlessHappiness - 06-12-2012, 06:10 PM
RE: Scripting Help - by FlawlessHappiness - 06-12-2012, 06:20 PM



Users browsing this thread: 1 Guest(s)