Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple Issues Help Portal
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#1
Portal

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 :/

(This post was last modified: 10-28-2014, 11:39 AM by Straxedix.)
10-28-2014, 10:03 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Portal

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.

10-28-2014, 10:28 AM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#3
RE: Portal

I changed text sorry for that...

(This post was last modified: 10-28-2014, 11:43 AM by Straxedix.)
10-28-2014, 10:35 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#4
RE: Portal

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.
}

Trying is the first step to success.
10-28-2014, 11:48 AM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#5
RE: 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

10-28-2014, 11:54 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#6
RE: Portal

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

Trying is the first step to success.
10-28-2014, 12:03 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#7
RE: Portal

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
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#8
RE: Portal

(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.

Trying is the first step to success.
10-28-2014, 12:32 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#9
RE: Portal

(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
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#10
RE: Portal

(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);

Trying is the first step to success.
10-28-2014, 12:35 PM
Find




Users browsing this thread: 3 Guest(s)