DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

How to handle lava tiles?
Page 1 of 1
DieHard Wolfers Forum Index -> SDL Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
fraggeur
DieHard SS
DieHard SS


Joined: 31 Dec 2012
Last Visit: 13 Jul 2019

Topics: 14
Posts: 332

blank.gif

PostPosted: Sat Sep 12, 2015 12:08 pm
   Subject: How to handle lava tiles?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

I already have the lava texture but I wonder what approach I should take to hurt the player when he is on it.
I am seeking for an acid/lava damage type, x damage per second.
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 16 Jul 2019

Topics: 56
Posts: 2234
Location: Canada
blank.gif

PostPosted: Sat Sep 12, 2015 1:07 pm
   Subject: Re: How to handle lava tiles?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

This timed effect approach seems good:
http://diehardwolfers.areyep.com/viewtopic.php?p=88935#88935

You could customize it for lava with something like this
::: CODE :::
if ( ((MAPSPOT(player->tilex,player->tiley,2))&0xff) == 7)      // 7 being the 3rd plane map value of the lava floor
{
    gamestate.lavaTics += tics;
    if (gamestate.lavaTics >= 70)
    {
        gamestate.lavaTics = 0;
        TakeDamage (13,NULL);       // 13 being the damage dealt per second
    }
}
fraggeur
DieHard SS
DieHard SS


Joined: 31 Dec 2012
Last Visit: 13 Jul 2019

Topics: 14
Posts: 332

blank.gif

PostPosted: Sun Sep 13, 2015 7:07 am
   Subject: How to handle lava tiles?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Thanks Chris, it just works great!
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> SDL Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 1 of 1
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts [Resolved] Doom-style player movement routine
Author: Tricob
11 2280 Sat Aug 17, 2013 8:15 am
Tricob View latest post
No new posts Getting a count of a particular wall/texture on a level
Author: Andy_Nonymous
2 1153 Mon May 17, 2010 12:58 am
Andy_Nonymous View latest post
No new posts Multiple Elevator Tiles?
Author: StoneFrog
2 1076 Sun Apr 12, 2009 2:49 pm
StoneFrog View latest post
No new posts [Help] BrotherTank's Enemy Damage Tutorial: LOWERING Damage?
Author: StoneFrog
8 1658 Wed Dec 10, 2008 7:51 pm
StoneFrog View latest post
No new posts [Wolf4SDL Help] Inserting a second palette (like in SoD)
Author: Andy_Nonymous
10 4310 Mon Jun 02, 2008 3:59 pm
Adam Biser View latest post
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
   You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group