Frictional Games Forum (read-only)
[CHAOS] Portal - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [CHAOS] Portal (/thread-27003.html)

Pages: 1 2 3


Portal - Straxedix - 10-28-2014

Hello i tried to not post this thread,i searched on youtube and google and in last level but that didn't helped a lot.

So what i want here is if anyone can FULLY explain me how to make portal +rep to one who solve this

Steps:
Spoiler below!
1Tongueortal for start should be invisible (inactive)
Spoiler below!
2Tonguelayer walks in area and slowly activate portal visibility
Spoiler below!
3Tongueortal could not be used instantly (timers) so if player use it before portal is "Done" it will damage his sanity and health throwing him really hard back.
Spoiler below!
4Tongueortal now can be clicked on, so some script goes on.
Spoiler below!
That's all,other script (what will happen when he click on portal) i will make (i am not that stupid i think).

So this is all how i can explain and it is pretty hard for me and i know maybe no one will solve this :/


RE: Portal - Mudbill - 10-28-2014

Just gonna say that you don't need to format your text like that. It looks better plain. Pretty hard to read when it's so bold that it's basically just a blob left.


RE: Portal - Straxedix - 10-28-2014

I changed text sorry for that...


RE: Portal - FlawlessHappiness - 10-28-2014

Ok, let's do this.

We're gonna need 2 areas.

Area1 = The area the player collides with.
Area2 = The area the player touches.

void OnStart()
{
AddEntityCollideCallback("Player", "Area1", "BeginPortal", true, 1);

SetEntityPlayerInteractCallback("Area2", "TouchPortal", false);
}

void BeginPortal(string &in asParent, string &in asChild, int alState)
{
CreateParticleSystemAtEntity(string& asPSName, string& asPSFile, string& asEntity, bool abSavePS);
//Remember to create the different particle systems. I don't have the names here.

AddTimer("OpenPortal", 5, "PortalTimer");

SetEntityActive("Area2", true);
SetLocalVarInt("PortalOpen", 0);
}

void PortalTimer(string &in asTimer)
{
if(asTimer == "OpenPortal")
{
CreateParticleSystemAtEntity(string& asPSName, string& asPSFile, string& asEntity, bool abSavePS);
//Remember to create the different particle systems. I don't have the names here.

SetLocalVarInt("PortalOpen", 1);
}
}

void TouchPortal(string &in asEntity)
{
if(GetLocalVarInt("PortalOpen") == 1)
{
UsePortal();
}
else
{
GivePlayerDamage(1.0f, "BloodSplat", true, false);
}
}

void UsePortal()
{
//Do stuff when using portal.
}


RE: Portal - Straxedix - 10-28-2014

Woooo easy dude easy Big Grin
First i don't have model (or whatever is it) of portal inactive or something...
So i need PS and how that can help me
Other thinks are like wow thanks


RE: Portal - FlawlessHappiness - 10-28-2014

The PS for the portal is orb_portal_open and orb_portal_something Smile I don't remember the exact names.


RE: Portal - Straxedix - 10-28-2014

CreateParticleSystemAtEntity(string& asPSName, string& asPSFile, string& asEntity, bool abSavePS);
//Remember to create the different particle systems. I don't have the names here.


ThisConfusedtring& asEntity, bool abSavePS);

What to put there ?


RE: Portal - FlawlessHappiness - 10-28-2014

(10-28-2014, 12:28 PM)Straxedix Wrote: CreateParticleSystemAtEntity(string& asPSName, string& asPSFile, string& asEntity, bool abSavePS);
//Remember to create the different particle systems. I don't have the names here.


ThisConfusedtring& asEntity, bool abSavePS);

What to put there ?

asEntity is the entity where the particle system should spawn.

abSavePS should just be false.


RE: Portal - Straxedix - 10-28-2014

(10-28-2014, 12:32 PM)FlawlessHappiness Wrote:
(10-28-2014, 12:28 PM)Straxedix Wrote: CreateParticleSystemAtEntity(string& asPSName, string& asPSFile, string& asEntity, bool abSavePS);
//Remember to create the different particle systems. I don't have the names here.


ThisConfusedtring& asEntity, bool abSavePS);

What to put there ?

asEntity is the entity where the particle system should spawn.

abSavePS should just be false.

Like floor or what ?


RE: Portal - FlawlessHappiness - 10-28-2014

(10-28-2014, 12:34 PM)Straxedix Wrote:
(10-28-2014, 12:32 PM)FlawlessHappiness Wrote:
(10-28-2014, 12:28 PM)Straxedix Wrote: CreateParticleSystemAtEntity(string& asPSName, string& asPSFile, string& asEntity, bool abSavePS);
//Remember to create the different particle systems. I don't have the names here.


ThisConfusedtring& asEntity, bool abSavePS);

What to put there ?

asEntity is the entity where the particle system should spawn.

abSavePS should just be false.

Like floor or what ?

Hmm?

It should look like this:

CreateParticleSystemAtEntity("", "orb_portal_begin.ps", "Area2", false);