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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with a script.
Doctorcheese Offline
Senior Member

Posts: 272
Threads: 28
Joined: Jan 2011
Reputation: 0
#1
Help with a script.

So, I'm gonna make an event so that when you want in the area i set out, everything slowly goes white and you spawn at a PlayerStart in another level?

Is that possible?

''Sick, twisted child... You'll burn for this!''
06-18-2011, 11:18 AM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#2
RE: Help with a script.

AddEntityCollideCallback("Player" , "*nameofyourarea*" , "flashspawnsomething" , true , 1);
that into OnStart

then do smthing like this

void flashspawnsomething(string &in asParent, string &in asChild, int alState)
{StartEffectFlash(1.0f, 1.0f, 1.0f);
AddTimer("blehblabh", 1.0f, "timedteleport");
}
void timedteleport(string &in asTimer)
{TeleportPlayer(string& asStartPosName);
}

that will actually do everything in just 1second, but with tweaking the start effect flash functions numbers and the timer, you can slow it down...
Or do you mean whole another level/map? if so then use:
ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
instead of teleport
(This post was last modified: 06-18-2011, 11:24 AM by Khyrpa.)
06-18-2011, 11:22 AM
Find
Doctorcheese Offline
Senior Member

Posts: 272
Threads: 28
Joined: Jan 2011
Reputation: 0
#3
RE: Help with a script.

(06-18-2011, 11:22 AM)Khyrpa Wrote: AddEntityCollideCallback("Player" , "*nameofyourarea*" , "flashspawnsomething" , true , 1);
that into OnStart

then do smthing like this

void flashspawnsomething(string &in asParent, string &in asChild, int alState)
{StartEffectFlash(1.0f, 1.0f, 1.0f);
AddTimer("blehblabh", 1.0f, "timedteleport");
}
void timedteleport(string &in asTimer)
{TeleportPlayer(string& asStartPosName);
}

that will actually do everything in just 1second, but with tweaking the start effect flash functions numbers and the timer, you can slow it down...
Or do you mean whole another level/map? if so then use:
ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
instead of teleport

Ok, thank you!

''Sick, twisted child... You'll burn for this!''
06-18-2011, 11:32 AM
Find




Users browsing this thread: 1 Guest(s)