Taking damage while under water.

Post topics regarding Level Building/Design and Entity Usage with Reality Factory
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Taking damage while under water.

Post by incenseman2003 »

I set up some swimable water and it works great. I did notice that the player takes no damage no matter how long he is under water. It make sense that the player should take damage if under the water to long. Is there a way to fix this?

What should the folowing settings be to make this happen?

DamageAltAmount=
DamageAltAttribute=
DamageAltDelay=
DamageAmount=
DamageAttribute=
DamageDelay=
DamageIn=
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
hike1
RF FAQ-Keeper
Posts: 607
Joined: Tue Jul 05, 2005 4:19 am
Contact:

Post by hike1 »

In the Asylum demo 2, the player has an oxygen attribute which goes down,
and is related to the hit points, but I don't remember how it was implemented,
the .3dt and scripts and .ini's are all there for you to look at though.
Nout
Posts: 136
Joined: Tue Jul 05, 2005 5:14 pm

Post by Nout »

You can apply damag by scripting
Look to the script language and search for "damage"
GD1
Posts: 413
Joined: Tue Jul 05, 2005 2:33 pm

Post by GD1 »

scripting isn't really necessary. You can set it all up in the liquid entity. just look up the liquid entity in the docs and it should tell you what does what.
Check out my band
Tougher Than Fort Knox
Image
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Post by incenseman2003 »

hike1,

I tried to open the 3dt for the Asylum demo 2 and the RFEditPro crashed emediatly. So I cant examine it that close. If it was done in world editor 2 and I need that to open the 3dt then I will never see it. I dont have it and have no plans to buy it. RFEditPro does the job just fine. I have seen world editor 2 and it does the same thing that RFEditPro does, It just does it differently.


Nout,

I barely understand the scripting of anything though I am learning.


GD1,

I have all the settings for the liquid entity set as the manual implies. Still no damage to the player while under water. The help docs are just not detailed enough on this subject it seems.


Back to square one.

"What should the folowing settings be to make this happen?

DamageAltAmount=
DamageAltAttribute=
DamageAltDelay=
DamageAmount=
DamageAttribute=
DamageDelay=
DamageIn=
"

There must be someone that can just type in the settings for each and my hunt for the answer will be over. If not then I guess I will have to just keep digging till I find the answer. I have alot of time on my hands.

Thanks for the attempts. it is greatly appreciated.

VIVA LE RF!!!!!!!!!!
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

If DamageAttribute is larger than 0 it DamageAttribute will be reduced, otherwise DamageAltAttribute will be reduced

DamageAltAmount = 5 - amount of damage you want to cause
DamageAltAttribute = health - attribute (declared in attribute.ini (or player.ini, or whatever file you use as attribute file)) you want to reduce
DamageAltDelay = 4 - interval the damage is applied to the player


DamageAmount = 10
DamageAttribute = oxygen
DamageDelay = 1

DamageIn = false - only reduce oxygen under water

in the playersetup.ini file you can specify certain attributes to auto increase
http://dhost.info/realityfactory/online ... .htm#[Misc]
you should add oxygen to the list of attributes that auto increase, so that it restores once your no longer under water
attributename0=oxygen
recoverytime0=20

that's all about it...
hike1
RF FAQ-Keeper
Posts: 607
Joined: Tue Jul 05, 2005 4:19 am
Contact:

Post by hike1 »

dont have it and have no plans to buy it.
It's free, on this site's download page. RTFM!
RTFFAQ!
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Post by incenseman2003 »

hike1
RF Dev Team,

There is no mention of the "World Editor 2" in the manual that I could see please point that out to me.

As for "RTFM!".

This is what it says in the manual:

"Liquid
The Liquid entity is used to turn an empty model into a liquid that the player can float and swim in.

Field Descriptions
The fields for the Liquid entity are:

Field
Description

Alphamap
Name of alpha map used for tinting

Bitmap
Name of bitmap used for tinting

DamageAltAmt
Amount of alternate damage done

DamageAltAttr
Alternate attribute that is damaged

DamageAltDelay
Delay before more alternate damage is done

DamageAmt
Amount of damage done

DamageAttr
Attribute that is damaged

DamageDelay
Delay before more damage is done

DamageIn
if True then damage by being in liquid rather than under liquid

GravityCoeff
Percentage of gravity when in liquid (0 to 100)

InLiquidSound
Name of sound played when walking in liquid

Model
Empty model that is converted to liquid

SpeedCoeff
Percentage of speed when in liquid (0 to 100)

SurfaceSound
Name of sound played when breaking surface in liquid

SwimSound
Name of sound played when moving under liquid

szEntityName
The name of this entity

TintColor
Color of liquid

Transparency
Transparency of tint of water (0 to 255)


The model should be flagged as empty for it to work as a liquid. When the player far enough in the liquid he will switch to the treadwater animation. When moving in liquid the player uses the swim animation."


In QuestOfDreams post certain things are mentioned that are not in the manual. Thanks QuestOfDreams.

the manual didnt specify:
DamageAmount = 10
DamageAttribute = oxygen
DamageDelay = 1

I had all but the "DamageAttribute = oxygen".

I was using "DamageAttribute = health".

It didnt work.

The manual did not give me any examples to go by.

I could have stabbed in the dark till whenever if it wasnt for QuestOfDreams.

Here is a list of "Alternative Level Editors" on the download page:
rfEdit 594 KB Download
WorldEdit


It doesnt mention World Editor 2. If the "WorldEdit" is the World Editor 2 there is no way that I could know that. If it isnt then the World Editor 2 then it isn there.

As for "RTFFAQ!".

Here are all the entries in the FAQ that mention liquid.

"Q. I 'm trying to create a level in which the player's health decreases
at a constant rate. I've tried creating empty brushes with the Brush
Attributes set to "lava" or "toxic gas" but these don't seem to work.
I've been able to achieve the desired effect with the Liquid Entity and
an empty model, but I don't want to have to resort to this.

A. Make an empty brush and use whatever fill for it you want.
(Toxic gas will do it..) texture it and set transparency.
Make that a model.
Then a trigger entity (Which you want to be the model)
which triggers a Modify attribute entity. make this effect your
health attribute by whatever factor you need it to."


"Q. How can I make an object float in water?

A. If you use the Liquid entity to make your water then Pawns will float
as well as the player. You have to set the gravity to a negative value
to make something float in water. Make your floating actor a Pawn
with a simple script and it will float in place."


"Q. Echaos is crashing my level when I try to use it with the Liquid Entity.

A. First, your echaos should NOT have a .bmp on the 'attachbmp' entry, if
your texture you want echaos'ed is brikbrw3.bmp just put brikbrw3 in the attachbmp
entry. You don't need any parameters other than those that are already there.
Second, you don't need anything in the Liquid entity referring to any .bmps, other than
the default 'water.bmp' and 'a_water.bmp', which should go in /Media/Bitmaps. As long as
'brikbrw3' is in your .txl file the Echaos will work."


"Q. My level won't compile, it says * *** LEAK *** *
* Level is NOT sealed. *
* Optimal removal will not be performed.*

A. Open up 'test.pnt', a red line will be drawn from an entity to
where the 'liquid' is leaking out the crack. See one of the
worldedittips.zips on the Download page of terrymorgan.net for
details."


"Q. I get stuck when I'm swimming and I surface under a solid brush.

A. Place the brush far above the liquid so you'll never collide with it."

Please point out the part that makes it clear as to what settings should be used to get the effect I want. I did ""RTFM!" and I did "RTFFAQ!".

As for your aggressive attitude notated by the colorful abbreviations: Not that original.

But please feel free to say whatever makes you feel better. You will anyway. I wouldnt dream of stopping you even if I could. Its not important to me.

I understand that you and others donate your time for free. It is appreciated. Please understand however that I am bullet proof due to the fact that I have things about me that make others say bad things to me all the time. I dont take offense to your remarks in any sense of the of the word.

No offense intended. I feel no bad feeling toward you at all.

Im just pointing out that it isnt as simple as you seem to want it to look.

Hope you have an awsome day!!
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
hike1
RF FAQ-Keeper
Posts: 607
Joined: Tue Jul 05, 2005 4:19 am
Contact:

Post by hike1 »

#1 Download everything that might possibly help you.

Quest is in charge of this site, he put 'world edit' it's probably
on my page also. RTFM, RTFFAQ is for why you can't load the
asylum.3dt's, you have to point your directories at the proper
places.

Here's what the Liquid entity says in the asylum.3dt, Damage
alt amt 6
Damage altattr oxygen
damage alt delay 1
Damage amt 4
Damage ATTR- health
damage delay 1
Damage in :False
Gravity Coeff 60
model water
speed coeff 60

tint color 1 115 175
transparency 64


You can find out what all the parameters mean by
reading 'GAMEENTITYDATATYPES.H' in your
/Source directory.

in Player.ini You don't need world editor 2 to read this:


; Player health (required)
[health]
initial =1300
low = 0
high = 1300


[oxygen]
initial = 300
low = 0
high = 300

Also a demo of liquid on my download page. I salute your
ambition in learning this mass of spaghetti, but be reminded
that Quest is probably the only 1 left developing it. I'm changing to Dungeon Hack, because RF's 8-year-old renderer is a joke.

BUT, there's still a bunch of good game code here, I wish the
programmers would get a clue and port it to Dungeon Hack.
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

Hike1, did you not know about RF2?
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Post by incenseman2003 »

What can you tell us about RF2?
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

a ton. what do you want to know?

there's a ton of info in the topic "RF2 Discussion" in general topics, as well as in the blog accessable in my signature (Artisan == RF2). if that dosent answer it, feel free to ask anything.
hike1
RF FAQ-Keeper
Posts: 607
Joined: Tue Jul 05, 2005 4:19 am
Contact:

Post by hike1 »

I'm not waiting for 'RF2' I've seen many
'RF2's' come and go. Dungeon Hack is using the 2006 Ogre renderer, check ogre3d.org to see
how popular THAT is, and it uses Blender,
check Elysiun.com to see how popular THAT is. True Dungeon Hack has only 1 programmer, which is why I've been pimping it
on the RF and Ogre forums, it's open source gnu license, ready for someone smarter than me to put in the A.I. Oh, did I mention it has
Newton physics?
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Post by incenseman2003 »

Setup / Basic Main Loop 100%
Ini Reader Class 75%
Log Writer Class 100%
Menu Class 12%
CommonData Class 6%

Looks good to me.

I will bokkmark your site to keep an eye on it.

What new things will be supported?

What is the target date for release?

Will it still be free and open source?

Will it still use RFEditPro or will it have a new editor?

Will it have a better graphics renderer?

Will it have a more complete and comprehensive manual (with exaples for all the settings and such)?

Will it have more basic characters and weapons to choose from to get someone started?

Will it still use the act format for the characters and such?

Will there be a full scripting manual?

Cant wait!!
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

@Hike1: I understand your skepticism. I would be very skeptical as well. And as for Ogre3D, Irrlicht (RF2's engine) is really it's main competitor, and was chosen for features that Ogre3D did not have, ease of programming (and thus faster development and more frequent updates), and the much more free license. Blender will be the preferred modeling program for RF2.

@Man: You may not see it update for a few days, things are going on behind the scenes I will detail in the blog when complete.

Many, many new things will be supported. DirectX9, shaders, parallax mapping, octtree, better support for actors (pretty much interchangeable with level geometry now), among others.

I don't have a (public) release date, except for when it's done.

Yes, it will be free and open source.

It will use a completely rewritten RFEditPro.

It has a much better renderer. It uses the Irrlicht engine ( http://irrlicht.sourceforge.net/ ), which has renderers for OpenGL, software, a better software, Direct3D8, and Direct3D9.

I honestly don't know about the manual.

There should be much easier weapon / enemy integration. I'm toying with an idea called "Templates" for just such a thing.

No, the act format has been dumped for many native formats, such as .3ds, .x, .ms3d, .my3d, and .obj, among others. You can choose from any to create your actors. .x or .ms3d is preferred.

Yes, there will be a full scripting manual.
Post Reply