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 → xtank4.cog
xtank4.cog
2002-09-01, 12:48 PM #1
I have a question. Where does the verb GetThingUserData(barrel); get its info from? It isn't from the template, cause I checked already. Im trying to edit how much damage the barrel will take before exploding. I think I could probably do: barrelhealth = 1000; instead of: barrelhealth = GetThingUserData(barrel); but I want to edit it through where GetThingUserData gets its number. Thankyou.
"The world is neither black nor white but differing shades of gray."
-By me.
2002-09-01, 1:00 PM #2
Code:
created:
   SetThingUserData(GetSenderRef(), 55);     // set the initial user data (i.e. "health")
   Return;


The "userdata" is set when the object is created. This, like most LEC cogs, suXbad, and I really should write a new one...

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-09-01, 1:04 PM #3
Thankyou again.
"The world is neither black nor white but differing shades of gray."
-By me.
2002-09-02, 10:20 PM #4
I never could figure out why they have a one or two second timer on those fuel tank cogs...it makes me feel like my computer is lagging when i shoot it.

------------------
Sanctum de la Mort

Restless
2002-09-03, 1:57 AM #5
It's so you can get away, which defeats the purpose of shooting the tank in the first place.
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-09-03, 6:34 AM #6
Userdata is a special value given to things to be used with cogs. It has no purpose other than to be used by Cog.

As to the use of userdata: class cogs can control any number of barrels in the game. The cog is not copied for each barrel, every barrel uses that one cog. So you obviously can't use variables to hold the hull setting because you would need complicated arrays, and you would limit the cog.

Instead, LEC chose - quite rightly - to use each thing's userdata to store the hull setting. Xtank4.cog does not have any serious problems IMHO.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-09-03, 1:32 PM #7
So why did you say the "rifleman's" userdata would not be set to 0 after startup? You're contradicting yourself. [http://forums.massassi.net/html/confused.gif]

BTW - my first day of school. [http://forums.massassi.net/html/frown.gif] Boring, paperwork, and homework (9th grade). That means (bum bum bom) less time for cogging and level editing. At least I have a comp programming class. Learn some more basic/C. [http://forums.massassi.net/html/smile.gif]

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

The Magician Saber System.

[This message has been edited by Descent_pilot (edited September 03, 2002).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-09-04, 3:56 PM #8
Regarding the barrel explosions short lul before blowing up...
It seems more realistic. Or atleast mor dramatic. Cars dont blow up in movies immediately. Its takes a split second for that chemicl reaction to occur.

More precisely in the Star Wars universe the Death Stars didnt blow up right away.
Cause if they did, well, ...
that would have sucked. [http://forums.massassi.net/html/biggrin.gif]
2002-09-05, 7:01 AM #9
Quote:
<font face="Verdana, Arial" size="2">So why did you say the "rifleman's" userdata would not be set to 0 after startup? You're contradicting yourself.</font>


I believe I said that there was no need to set the userdata to 0 at startup because it was already 0.

Quote:
<font face="Verdana, Arial" size="2">At least I have a comp programming class. Learn some more basic/C.</font>


You are quite lucky to have that class. I was homeschooled for the most part, and my parents knew next to nothing about the workings of a computer. So you can imagine how much computer science I got to do. [http://forums.massassi.net/html/frown.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-09-05, 12:23 PM #10
I guess I misunderstood or misremembered what you said. oh well. [http://forums.massassi.net/html/wink.gif]

I'm teaching my Mother on how to use a comp, my dad still uses a 1995 comp, only been upgraded once in since then, and that was a 3d accerator GC in 2000.

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

The Magician Saber System.

[This message has been edited by Descent_pilot (edited September 05, 2002).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack

↑ Up to the top!