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
Script Help Acid Scare
T122002 Offline
Junior Member

Posts: 24
Threads: 10
Joined: Dec 2012
Reputation: 1
#5
RE: Acid Scare

(10-21-2013, 08:14 PM)FlawlessHair Wrote:
(10-21-2013, 01:35 PM)DnALANGE Wrote: Could you explane a bit moer of this part : now that the player has the jar filled with acid, I want him/her to collide with a script area shortly after which will spawn a suitor nearby

AND this part:
When I change the scripting on the SetEntityCallbackFunc from "glass_container_filled" to "glass_container_1" then the script box goes off before I even fill the container with acid
,
WHY do you have 2 glascontainers?

2 containers because: 1 is empty. 1 is filled.

He uses the empty container on the area.
Another area is set active.
You do this by SetEntityActive("AREANAME", true);

Then the collide function

void COLLIDEFUNCTION(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("SUITORNAME", true);
}

You also might want to add some pathnodes. Do you know how to?

Yes, I know how to use Pathnodes.
I've tried the stuff you said. I put in a picture for you to see the level.

Within' the picture, there is the barrel of acid. There is a small script area above the pot of acid so when you interact with the barrel, you take damage. So don't worry about the little script area above the barrel of acid.
Anyways, when I use the "glass_container_1" on the acid barrel, the current "glass_container_1" disappears and becomes the "glass_container_filled".

At this point when you actually have the container filled with acid. I want the player to turn around and walk forward, except now the script area will now be active and the monster will spawn.
However, even though I already have the script to set so that the script area will be active, nothing happens.

The script area name is "SpawnEnemy", so in my code when I have this and the Suitor name is "Enemy_1". So my code looks just like this:

void OnStart()
SetEntityCallbackFunc("glass_container_filled", "SuitorScare");

void SuitorScare(string &in asEntity, string &in type)
{
SetEntityActive("SpawnEnemy", true);
AddEntityCollideCallback("Player", "SpawnEnemy", "SpawnSatan", true, 1);
}

void SpawnSatan(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Enemy_1", true);
}

But nothing happens at all.

But the weird thing is, is if I change the name on my SetEntityCallbackFunc from "glass_container_filled" to "glass_container_1", then the script area goes off without even getting the acid.


Attached Files
.jpg   Untitled.jpg (Size: 188.42 KB / Downloads: 118)
10-22-2013, 03:07 AM
Find


Messages In This Thread
Acid Scare - by T122002 - 10-21-2013, 04:25 AM
RE: Acid Scare - by DnALANGE - 10-21-2013, 01:35 PM
RE: Acid Scare - by FlawlessHappiness - 10-21-2013, 08:14 PM
RE: Acid Scare - by T122002 - 10-22-2013, 03:07 AM
RE: Acid Scare - by Wapez - 10-21-2013, 09:01 PM
RE: Acid Scare - by daortir - 10-22-2013, 02:55 PM
RE: Acid Scare - by T122002 - 10-23-2013, 03:57 AM
RE: Acid Scare - by Wapez - 10-23-2013, 08:11 AM
RE: Acid Scare - by T122002 - 10-23-2013, 09:58 PM
RE: Acid Scare - by Wapez - 10-24-2013, 10:45 AM
RE: Acid Scare - by T122002 - 10-24-2013, 06:26 PM
RE: Acid Scare - by Wapez - 10-24-2013, 08:55 PM
RE: Acid Scare - by Wapez - 10-25-2013, 10:38 AM
RE: Acid Scare - by T122002 - 10-26-2013, 03:49 AM
RE: Acid Scare - by Wapez - 10-26-2013, 01:56 PM



Users browsing this thread: 1 Guest(s)