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 → Blown-off-the door cog...
Blown-off-the door cog...
2002-08-15, 10:37 AM #1
I need a cog where when a door is dealt enough damage (as a variable) the door moves to frame 1 about a ghost point. Is it also possible to accelarate the door, so that it would be like it had fallen over... if not with the accelaration, don't worry. The idea is that the door is blown off its hinges on to the floor, so the player can escape.

Any offers?

------------------
"Yo! Yo! Yo! Yo-yo!"
We're three million years into deep space. Where the smeg did I get a traffic cone?

<font face="Verdana, Arial" size="2">Originally posted by Avenger:
I'm more worried about the waffle intake. That's a lot of waffles.</font>
2002-08-15, 12:00 PM #2
Do you want a door that pivots (ex. Pushed/kicked down or to the side) or one that slides?

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-08-16, 10:37 AM #3
Pivots... it needs to hit the ground.

------------------
"Yo! Yo! Yo! Yo-yo!"
We're three million years into deep space. Where the smeg did I get a traffic cone?

<font face="Verdana, Arial" size="2">Originally posted by Avenger:
I'm more worried about the waffle intake. That's a lot of waffles.</font>
2002-08-16, 11:10 AM #4
Simple enough, I hope this is for JK. Else its going to get alot tricker.
Code:
# Jedi Knight Cog Script
#
# ACTOR_MD.COG
#
# Class cog
# Used for rotating doors on a pivot when damaged enough
#
# [DP]
#
# ========================================================================================

symbols

message		created
message		damaged

int			door			      			local
flex			doorHealth  					local
flex			damage						local

end

# ========================================================================================
code

Created:
   SetThingUserData(GetSenderRef(), 25);				// set the initial user data (i.e. "health")
   Return;

# ............................................................................................

Damaged:
   door = GetSenderRef();
   damage = GetParam(0);
   doorhealth = GetThingUserData(door);

   If((GetParam(1) == 4)||(GetParam(1) == 8)) Return;		// Door only damaged by Explosion or Saber

   If(doorHealth <= damage)						// Is this enough damage to move the door?
   {
      RotatePivot(GetSenderRef(), 0, .5);				// Move the door around frame 0
      Return;
   }

   SetThingUserData(door, doorHealth - damage);
   Return;

end
You can change the move time (.5 in Rotate Pivot) to less for a faster time. You can change the health in the created message's SetThingUserData. Any more questions, just ask, and give me credit for this, this is/was one of my personal cogs I was going to use. [http://forums.massassi.net/html/wink.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-08-16, 11:28 AM #5
Cool... thanks.

------------------
"Yo! Yo! Yo! Yo-yo!"
We're three million years into deep space. Where the smeg did I get a traffic cone?

<font face="Verdana, Arial" size="2">Originally posted by Avenger:
I'm more worried about the waffle intake. That's a lot of waffles.</font>
2002-08-16, 11:46 AM #6
I had it ready a year earlier, because I knew you were going to ask this question. [http://forums.massassi.net/html/biggrin.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack

↑ Up to the top!