Aller au contenu

Photo

Map Pins


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
nn125

nn125
  • Members
  • 42 messages
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

#2
georage

georage
  • Members
  • 247 messages
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);

Modifié par georage, 12 décembre 2009 - 04:06 .