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
IT WORKS! yay
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#11
RE: Player Respawn on other map

(04-11-2012, 03:16 PM)jessehmusic Wrote: okey i got the changemap now but Daniel start looking in the ground and he donst stop any clue?
.
I have no idea why. Can you elaborate a bit?
When does it happen, before/after death?, on the next map?
04-11-2012, 03:24 PM
Website Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#12
RE: Player Respawn on other map

After the death i spawn at the area then "Daniel keeps looking on the ground" , wtf? here is script

void OnStart()
{
CheckPoint ("", "playerstart_1", "ChangeMap", "Message", "Death");

}


void ChangeMap(string &in asName, int alCount)
{
ChangeMap("Map3.map", "PlayerStartArea_1", "", "");
}


http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-11-2012, 03:29 PM
Website Find
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#13
RE: Player Respawn on other map

(04-11-2012, 03:29 PM)jessehmusic Wrote: After the death i spawn at the area then "Daniel keeps looking on the ground" , wtf? here is script

void OnStart()
{
CheckPoint ("", "playerstart_1", "ChangeMap", "Message", "Death");

}


void ChangeMap(string &in asName, int alCount)
{
ChangeMap("Map3.map", "PlayerStartArea_1", "", "");
}
.
void ChangeMap(string &in asName, int alCount)

Change the name of your function to something else, I do not think it can be named ChangeMap.

04-11-2012, 03:36 PM
Website Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#14
RE: Player Respawn on other map

(04-11-2012, 03:36 PM)Mackiiboy Wrote:
(04-11-2012, 03:29 PM)jessehmusic Wrote: After the death i spawn at the area then "Daniel keeps looking on the ground" , wtf? here is script

void OnStart()
{
CheckPoint ("", "playerstart_1", "ChangeMap", "Message", "Death");

}


void ChangeMap(string &in asName, int alCount)
{
ChangeMap("Map3.map", "PlayerStartArea_1", "", "");
}
.
void ChangeMap(string &in asName, int alCount)

Change the name of your function to something else, I do not think it can be named ChangeMap.
still doing it :S

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-11-2012, 03:40 PM
Website Find
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#15
RE: Player Respawn on other map

(04-11-2012, 03:40 PM)jessehmusic Wrote: still doing it :S
.
Wierd. I tried it out and it works perfectly. Do you change map after death at all?
I you do, can you put up the whole script from your other map?


04-11-2012, 03:42 PM
Website Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#16
RE: Player Respawn on other map

(04-11-2012, 03:42 PM)Mackiiboy Wrote:
(04-11-2012, 03:40 PM)jessehmusic Wrote: still doing it :S
.
Wierd. I tried it out and it works perfectly. Do you change map after death at all?
I you do, can you put up the whole script from your other map?

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "MusicStart", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "MonsterAttack", true, 1);
AddEntityCollideCallback("Player", "door_slam", "DoorSlam", true, 1);
AddEntityCollideCallback("Player", "Light_area", "Lights", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "MonsterAttack_1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "Lights1", true, 1);
SetEntityPlayerInteractCallback("ptest_cellar_wood01_1", "Bang1", true);
AddUseItemCallback("", "key_4", "ptest_cellar_wood01_3", "keyondoor4", true);
AddUseItemCallback("", "key_laboratory_1", "freedom_door", "keyondoor3", true);
AddUseItemCallback("", "The_gone_key", "Lockeddoor_1", "KeyOnDoor1", true);
CheckPoint ("", "playerstart_1", "Jalla", "Message", "Death");
}
void Jalla(string &in asName, int alCount)
{
ChangeMap("Map3.map", "PlayerStartArea_1", "", "");
}
void MonsterAttack_1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "Scary_sound.snt", "Player", 0, false);

SetEntityActive("grunt_2", true);
AddEnemyPatrolNode("grunt_2", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("grunt_2", "PathNodeArea_3", 0, "");
SetPropHealth("ptest_cellar_wood01_4", 0);
}
void Lights1(string &in asParent, string &in asChild, int alState)
{
SetLampLit("bridge_torch_2", true, true);
SetLampLit("bridge_torch_3", true, true);
PlaySoundAtEntity("", "Scary_sound.snt", "Player", 0, false);
}
void Lights(string &in asParent, string &in asChild, int alState)
{
SetLampLit("torch_static01_3", true, true);
SetLampLit("torch_static01_4", true, true);
}
void DoorSlam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door2", true, true);
PlaySoundAtEntity("", "05_event_door_bang.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
CreateParticleSystemAtEntity("", "ps_hit_wood.ps", "door2", true);
GiveSanityDamage(15.0f, true);
}

void keyondoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("freedom_door", false, true);
PlaySoundAtEntity("", "unlock_door", "freedom_door", 0, false);
RemoveItem("key_laboratory_1");
}


void MonsterAttack(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("grunt", 5.0f, 2.0f, "");
SetEntityActive("grunt", true);
ShowEnemyPlayerPosition("grunt");
AddTimer("", 4.0f, "stoplookenemy1");
GivePlayerDamage(99.0f, "", true, false);
SetPlayerActive(false);
}


void stoplookatenemy1(string &in asTimer)
{
StopPlayerLookAt();
SetPlayerActive(true);

}

void keyondoor4(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("ptest_cellar_wood01_3", false, true);
PlaySoundAtEntity("", "unlock_door", "ptest_cellar_wood01_3", 0, false);
RemoveItem("key_4");
}

void KeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Lockeddoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "Lockeddoor_1", 0, false);
RemoveItem("The_gone_key");
}

void Bang1(string &in asEntity)
{

}

void MusicStart(string &in asParent, string &in asChild, int alState)

{
PlayMusic("Ominous Noises - The Tortured Soul Scary Sound Effects.ogg", true, 0.8f, 1, 0, true);
}


http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-11-2012, 03:46 PM
Website Find
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#17
RE: Player Respawn on other map

I'm guesing there's a problem with this part of the script

Spoiler below!

void stoplookatenemy1(string &in asTimer)
{

StopPlayerLookAt();
SetPlayerActive(true);

}


Try troubleshooting that. I would also try this:

Spoiler below!

void Jalla(string &in asName, int alCount)
{

StopPlayerLookAt();
ChangeMap("Map3.map", "PlayerStartArea_1", "", "");

}

See if that helps Smile


Edit: Yep, found the problem.
Re-read what you wrote in the Timer callback, you've misspelt something Tongue

AddTimer("", 4.0f, "stoplookenemy1");
void stoplookatenemy1(string &in asTimer)

remove the 'at ' and it will work fine!

(This post was last modified: 04-11-2012, 03:55 PM by DRedshot.)
04-11-2012, 03:50 PM
Find
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#18
RE: Player Respawn on other map

(04-11-2012, 03:42 PM)Mackiiboy Wrote: Wierd. I tried it out and it works perfectly. Do you change map after death at all?
I you do, can you put up the whole script from your other map?
.
I guess that the script you did put up was not from the other map, I meant from "Map3.map" Shy
(This post was last modified: 04-11-2012, 03:51 PM by Mackiiboy.)
04-11-2012, 03:51 PM
Website Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#19
RE: Player Respawn on other map

(04-11-2012, 03:51 PM)Mackiiboy Wrote:
(04-11-2012, 03:42 PM)Mackiiboy Wrote: Wierd. I tried it out and it works perfectly. Do you change map after death at all?
I you do, can you put up the whole script from your other map?
.
I guess that the script you did put up was not from the other map, I meant from "Map3.map" Shy
i dont got any script at map3.map yet
(04-11-2012, 03:50 PM)DRedshot Wrote: I'm guesing there's a problem with this part of the script

Spoiler below!

void stoplookatenemy1(string &in asTimer)
{

StopPlayerLookAt();
SetPlayerActive(true);

}


Try troubleshooting that. I would also try this:

Spoiler below!

void Jalla(string &in asName, int alCount)
{

StopPlayerLookAt();
ChangeMap("Map3.map", "PlayerStartArea_1", "", "");

}

See if that helps Smile


Edit: Yep, found the problem.
Re-read what you wrote in the Timer callback, you've misspelt something Tongue

AddTimer("", 4.0f, "stoplookenemy1");
void stoplookatenemy1(string &in asTimer)

remove the 'at ' and it will work fine!
ty it worked

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
(This post was last modified: 04-11-2012, 04:01 PM by jessehmusic.)
04-11-2012, 03:55 PM
Website Find




Users browsing this thread: 1 Guest(s)