01-04-2013, 07:42 AM
Hopefully I'll get a little bit better at this so I won't have to continue bothering the forum with my questions.
I've set up a box (SafeBox_0) to trigger music when it collides with the area in front of a door (Area_Safe). That's working with this code:
Only problem is that I need the player to remove the box later and go back into the first room to retrieve a key from a different map (forcing them to leave the safe area, muahaha). The box won't move; I can't touch it or push it in game. That's a little bit problematic...
I'm not quite sure what I need to change. Any suggestions would be much appreciated for this
Oh, and also how do I stop the music once the box is out of the area? It's not stopping when I reload the map.
Edit: I'm putting all my questions here now to avoid spamming the forum
I've set up a box (SafeBox_0) to trigger music when it collides with the area in front of a door (Area_Safe). That's working with this code:
Code:
void OnStart()
{
AddEntityCollideCallback("SafeBox_0", "Area_Safe", "Script_Safe", true, 1);
}
void Intro ()
{
}
void OnEnter ()
{
}
void Script_Safe (string &in asParent, string&in asChild, int alState)
{
PlayMusic("09_amb_safe", true, 1, 6, 0, true);
}
I'm not quite sure what I need to change. Any suggestions would be much appreciated for this
Oh, and also how do I stop the music once the box is out of the area? It's not stopping when I reload the map.
Edit: I'm putting all my questions here now to avoid spamming the forum