Frictional Games Forum (read-only)

Full Version: Portal
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
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 :/
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.
I changed text sorry for that...
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.
}
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
The PS for the portal is orb_portal_open and orb_portal_something Smile I don't remember the exact names.
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 ?
(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.
(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 ?
(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);
Pages: 1 2 3