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
Teleport the player when he collides an area
KingCrimson Offline
Junior Member

Posts: 45
Threads: 14
Joined: Jul 2012
Reputation: 0
#1
Teleport the player when he collides an area

Hi there, my problem is that my player has to sleep to go to the other levels, so i put a script area on the bed so when the player gets on it, it gets teleported to another map. But i can't think the script. How should it be? Is it possible to do it?

Thanks in advance

Current Projects:
DADDY - 10%
08-05-2012, 12:47 AM
Find
EXAWOLT Offline
Member

Posts: 113
Threads: 14
Joined: Apr 2012
Reputation: 3
#2
RE: Teleport the player when he collides an area

http://wiki.frictionalgames.com/hpl2/amn..._functions
everything is in the forum!
ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
=the script

simply nuff said




08-05-2012, 12:53 AM
Find
KingCrimson Offline
Junior Member

Posts: 45
Threads: 14
Joined: Jul 2012
Reputation: 0
#3
RE: Teleport the player when he collides an area

Thanks, it was very useful

Current Projects:
DADDY - 10%
08-05-2012, 01:05 AM
Find
Melvin Offline
Member

Posts: 245
Threads: 38
Joined: Jun 2012
Reputation: 5
#4
RE: Teleport the player when he collides an area

(08-05-2012, 01:05 AM)ExenderVes Wrote: Thanks, it was very useful
Can you tell me how you did it? I can't seem to figure out were to put


void ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);


My next problem is: how does the script know what areas I want to use??
(the callback code perhaps?)


-SmokeMelvin

[Image: 25F7U37.png]
08-06-2012, 11:01 PM
Website Find
lolmaster Offline
Member

Posts: 170
Threads: 9
Joined: Jul 2012
Reputation: 6
#5
RE: Teleport the player when he collides an area

There are lots of ways to incorporate ChangeMap.

AddTimer(string& asName, float afTime, string& asFunction);

SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction);

AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates);


(This post was last modified: 08-07-2012, 03:45 AM by lolmaster.)
08-07-2012, 03:41 AM
Find




Users browsing this thread: 1 Guest(s)