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
Script Change map
djwhatkid Offline
Junior Member

Posts: 5
Threads: 3
Joined: Jan 2012
Reputation: 0
#1
Script Change map

so this is my script:

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptAreaCorpsespawn", "SpawnCorpse1", true, 1);
AddEntityCollideCallback("Player", "HeadSpawn1", "SpawnHead1", true, 1);
AddEntityCollideCallback("Player", "Behind_you1", "Behind_You", true, 1);
AddEntityGeneral("Player", "Bed_room_door1", "ChangeMap1", true, 1);
}


void SpawnCorpse1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("corpse1", true);
SetEntityActive("corpse2", true);
SetEntityActive("corpse3", true);
}


void SpawnHead1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("HeadbyOil", true);
}

void Behind_You(string &in asParent, string &in asChild, int alState)
{
PlayMusic("Behind_you.ogg", false, 30, 2, 1, true);
}


void ChangeMap1(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound)
{
asMapName("Main_hall.map", true);
asStartPos("PlayerStart_Main_hall1", true);
asStartSound("door_mansion_open.ogg", true);
asEndSound("door_mansion_close.ogg", true);
}


and i cant get it to work.
01-22-2012, 10:07 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: Script Change map

Replace "ChangeMap1 with this:



void ChangeMap1(string &in asParent, string &in asChild, int alState)
{
ChangeMap("Main_hall.map", "PlayerStart_Main_hall1", "door_mansion_open", "door_mansion_close");
}
(This post was last modified: 01-22-2012, 11:04 PM by Statyk.)
01-22-2012, 11:03 PM
Find
djwhatkid Offline
Junior Member

Posts: 5
Threads: 3
Joined: Jan 2012
Reputation: 0
#3
RE: Script Change map

ok thx
01-23-2012, 10:55 AM
Find




Users browsing this thread: 1 Guest(s)