Aller au contenu

Photo

SOLVED:How to make traps friendly?


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
I would like a certain set of traps (team 88) to be friendly.

Based on the Builder Wiki, I need to set PLC_TRAP_OWNER to that of a partymember. I am using the follow code in my preloadexit (interesting that this does not show up as a variable in the traps variables list):


        //
        // Get the traps (team 88) & make them friendly
        object oPC = GetHero();
        object[] arTraps = UT_GetTeam(88);
        int nTrapIndex;
        int nAllTrapsCount = GetArraySize(arTraps);
        for ( nTrapIndex = 0; nTrapIndex < nAllTrapsCount; nTrapIndex++)
        {
            object oTrap = arTraps[nTrapIndex];
            SetLocalObject(oTrap,PLC_TRAP_OWNER,oPC);
        }

Modifié par RecklezzRogue, 19 avril 2010 - 07:45 .


#2
Magic

Magic
  • Members
  • 187 messages
UT_GetTeam(88, OBJECT_TYPE_TRIGGER)

maybe?

#3
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
Nope - but - you got me there... ;-)



Fix = OBJECT_TYPE_PLACEABLE



Thanks.