First: portals (ps-s) are activated when you enter the map...
When i click on portal it gives me damage and that's okay...but i asked like in original amnesia to portal first be invisible,then when enter area first PS should activate slowly after some time second PS activate BUT when is first PS activated and if player clicks the portal he gets damage and stuff and when another PS activates when he clicks on portal it do the stuff...
void BeginPortal(string &in asParent, string &in asChild, int alState) { CreateParticleSystemAtEntity("Poral_Open", "ps_orb_room_portal_open.ps", "Touch", false); //Remember to create the different particle systems. I don't have the names here.
void PortalTimer(string &in asTimer) { if(asTimer == "OpenPortal") { CreateParticleSystemAtEntity("Portal_Start", "ps_orb_room_portal_start.ps", "Visible", false); //Remember to create the different particle systems. I don't have the names here.
You say the PSs goes active as they should. And you gain damage when you should... So what's not working?
Oh. Your problem was that it was already in the map. That's because you placed it in the map. You should NOT place the PS in the map. Only in the script.
Trying is the first step to success.
(This post was last modified: 10-28-2014, 12:52 PM by FlawlessHappiness.)
Not working think is that PS-s are activated when enter the maps..
-It should be when i enters area called "Visible"
Also not working think is that when i click on portal it gives me damage
-It should be when he enters area called "Visible" should slowly activate first ps then if player click on that ps (portal) he gets damage,then second ps-s activate slowly but first one disappear slowly.So when player now click on second ps he gets the
There are only 2 PS in mine map so...
And both PS-s are activated before entering "Visible" (but in level editor they are both Inactive)
Oh God damn i have to go to school :/
When you enter the area named "Visible" then you use that script to create your damaging particle system. You cannot really interact with particles though, but create an area there that you add the interaction callback to. You can either add the callback as you enter the area Visible, or have it already added but enable the disabled area instead when you enter Visible.
In the callback you added, give the player damage, run the DestroyParticleSystem script and another Create one to switch out the particles. Also either replace the area you interacted with with another, change which callback is applied to it, or use a variable in the existing callback (this one) to check if you've already interacted with it.
After that, another interaction can call your UsePortal(); script.
The only problem I can see is that the particles won't fade in and out unless they are made to do so (in the particle editor).
(10-28-2014, 01:00 PM)Mudbill Wrote: In the callback you added, give the player damage, run the DestroyParticleSystem script and another Create one to switch out the particles. Also either replace the area you interacted with with another, change which callback is applied to it, or use a variable in the existing callback (this one) to check if you've already interacted with it.
He's not supposed to take damage before the portal can spawn. It's only optional.
Also, Strax, just delete the PS in the Level Editor. You CANNOT set a particle system inactive. It doesn't work.
(10-28-2014, 01:00 PM)Mudbill Wrote: The only problem I can see is that the particles won't fade in and out unless they are made to do so (in the particle editor).
The portal particles fade in and out just fine. They were made like that by FG
Trying is the first step to success.
(This post was last modified: 10-28-2014, 01:03 PM by FlawlessHappiness.)
Also, Strax, just delete the PS in the Level Editor. You CANNOT set a particle system inactive. It doesn't work.
Wat ??? O.o Rlyyy ???
Btw i get srsly 2 problems:
First oneortals visible ALWAYS so i need it when i enter "Visible"
Second one:It should be when he enters area called "Visible" should slowly activate first ps then if player click on that ps (portal) he gets damage,then second ps-s activate slowly but first one disappear slowly.So when player now click on second ps he gets the