OK I've created an area, got a pin on the map, can travel there and all is hunky dory. But how do I control the pins state. Ie grey it, disable it, etc...
I tried this test code to flip its state
object oPin = GetPlayerMapPin(GetHero(),"pin_test_1");
SetMapPinState (oPin,!GetMapPinState(oPin));
and it didn't work.
Can someone please help
Best regards
NN
Map Pins
Débuté par
nn125
, déc. 12 2009 02:18
#1
Posté 12 décembre 2009 - 02:18
#2
Posté 12 décembre 2009 - 04:05
I would check to make sure oPin is valid. Then try this on an area HB to see if it toggles.
object oPin = GetPlayerMapPin(GetHero(),"pin_test_1");
if(!IsObjectValid(oPin))
SEND MSG TO PC
if(GetMapPinState(oPin)==TRUE)
SetMapPinState (oPin,FALSE);
else
SetMapPinState (oPin,TRUE);
object oPin = GetPlayerMapPin(GetHero(),"pin_test_1");
if(!IsObjectValid(oPin))
SEND MSG TO PC
if(GetMapPinState(oPin)==TRUE)
SetMapPinState (oPin,FALSE);
else
SetMapPinState (oPin,TRUE);
Modifié par georage, 12 décembre 2009 - 04:06 .





Retour en haut






