Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → need help with actor cog
need help with actor cog
2001-09-03, 5:49 AM #1
If I wanted to make a pedestrian not say any thing when touched, would I take this,
Code:
symbols

message     created
message     killed
message     skill
message     touched
message     timer
message     damaged

template powerup1=+DHealthPack   local
template powerup2=+DShield       local
template powerup3=+DBattery      local
flex     rval                    local
int      bin                     local
int      count                   local
int      id                      local
thing    newThing                local
thing    me                      local
thing    player                  local
thing    toucher                 local
thing    killer                  local
sound    hey=cm60155.wav
sound    leaves=cm60152.wav
sound    nothing=cm60149.wav
sound    mind=cm60142.wav
sound    whats=cm60146.wav
int      damage                  local
int      channel                 local
sound    manaSnd=ForceFieldHit01.WAV local

and turn it into this
Code:
symbols

message     created
message     killed
message     skill
message     timer
message     damaged

template powerup1=+DHealthPack   local
template powerup2=+DShield       local
template powerup3=+DBattery      local
flex     rval                    local
int      bin                     local
int      count                   local
int      id                      local
thing    newThing                local
thing    me                      local
thing    player                  local
thing    toucher                 local
thing    killer                  local
int      damage                  local
int      channel                 local
sound    manaSnd=ForceFieldHit01.WAV local

and then take out this from the code section?
Code:
touched:
   me = GetSenderRef();
   toucher = GetSourceRef();
   player = GetLocalPlayerThing();

   if (player != toucher) return;

   if (BitTest(AiGetMode(me), 0x800)) return;

   if (count == 1) return;

   rval = Rand();

   if (GetThingUserData(me) == 2)
   {
      channel = PlaySoundThing(nothing, me, 1, -1, -1, 0x10080);
      SetThingUserData(me, GetThingUserData(me) + 1);
      count = 1;
      SetTimerEx(3.0, 0, 0.0, 0.0);
      return;
   }

   if (GetThingUserData(me) == 3)
   {
      channel = PlaySoundThing(mind, me, 1, -1, -1, 0x10080);
      count = 1;
      SetThingUserData(me, GetThingUserData(me) + 1);
      SetTimerEx(3.0, 0, 0.0, 0.0);
      return;
   }

   if (GetThingUserData(me) >= 4)
   {
      channel = PlaySoundThing(leaves, me, 1, -1, -1, 0x10080);
      count = 1;
      SetTimerEx(3.0, 0, 0.0, 0.0);
      return;
   }

   if (rval < 0.47)
   {
      channel = PlaySoundThing(hey, me, 1, -1, -1, 0x10080);
      SetThingUserData(me, GetThingUserData(me) + 1);
      SetTimerEx(3.0, 0, 0.0, 0.0);
   }
   else if (rval < 0.95)
   {
      channel = PlaySoundThing(whats, me, 1, -1, -1, 0x10080);
      SetThingUserData(me, GetThingUserData(me) + 1);
      SetTimerEx(3.0, 0, 0.0, 0.0);
   }

   count = 1;

   return;


------------------
What to NEVER say to a cop if he pulls you over.

Cop: Your eyes look red, have you been drinking?

You: Your eyes look glazed, have you been eating donuts?
2001-09-03, 9:46 AM #2
You could probably take the
thing toucher local
and all the sounds
out as well if they aren't used anywhere else...
apart from that I guess it should work.. why don't you just try it heh.

-Raze

[This message has been edited by Raze (edited September 03, 2001).]
--
You are all just jealous because you can't hear the small voices!!
2001-09-03, 10:29 PM #3
Simplest is to take away
message touched
and nothing gets triggered on touching.

------------------
http://millennium.massassi.net/ - Millennium

[This message has been edited by Hideki (edited September 04, 2001).]

↑ Up to the top!