void Map (string &in asEntity, int alState)
{
if (alState == 1)
{
ChangeMap("00_Buda.map", "PlayerStartArea_1", "14_elevator_activate.snt", "elevator_move_normal.snt");
}
}
My hpl.log...
Spoiler below!
------- SCRIPT OUTPUT BEGIN --------------------------
main (1, 1) : INFO : Compiling void OnStart()
main (3, 2) : ERR : No matching signatures to 'AddUseItemCallback(string@&, string@&, string@&, const bool)'
main (3, 2) : INFO : Candidates are:
main (3, 2) : INFO : void AddUseItemCallback(string&in, string&in, string&in, string&in, bool)
main (4, 2) : ERR : No matching signatures to 'AddUseItemCallback(string@&, string@&, string@&, const bool)'
main (4, 2) : INFO : Candidates are:
main (4, 2) : INFO : void AddUseItemCallback(string&in, string&in, string&in, string&in, bool)
------- SCRIPT OUTPUT END ----------------------------
FATAL ERROR: Could not load script file 'TheManMachine/maps/14_MechanicalLaboratory.hps'!
main (3, 2) : ERR : No matching signatures to 'AddUseItemCallback(string@&, string@&, string@&, const bool)'
main (4, 2) : ERR : No matching signatures to 'AddUseItemCallback(string@&, string@&, string@&, const bool)'
There are 4 string arguments in a UseItemCallback, not 3 (Name, Item, Entity, Function). The "No Matching Signatures" error means you have the wrong amount or type of arguments in your function/callback.
(11-03-2012, 02:26 PM)beecake Wrote: Changing to another map would be:
ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
Immediatly loads another map. asMapName - the file to load asStartPos - the name of the StartPos on the next map asStartSound - the sound that is played when the change starts asEndSound - the sound that is played when the new map is loaded
You would have to play with variables to solve the other stuff
It doesn't work, I've tried SetEntityPlayerInteractCallback and SetEntityCallbackFunc.
That should work and would do the same as an examinearea, obviously adjust to whatever yours are. I don't know if that's what you did but..
Sadly enough, no luck. My hpl.log says the following:
------- SCRIPT OUTPUT BEGIN --------------------------
main (26, 9) : ERR : Expected identifier
------- SCRIPT OUTPUT END ----------------------------
FATAL ERROR: Could not load script file 'TheManMachine/maps/00_Buda.hps'!
main (26, 9) : ERR : Expected identifier