Welcome, Guest. Please login or register.

What openbor you prefer: Double dragon,battletoads or final fight !? by lirexpatrio
[December 07, 2012, 07:15:27 pm]


what are your favorite games OpenBOR?! by lirexpatrio
[December 07, 2012, 07:09:46 pm]


Post Some Awesome Videos by maxman
[December 07, 2012, 05:51:39 pm]


Can @cmd playmusic "aaaa" 1 also increse music sound ? by BeasTie
[December 07, 2012, 05:24:38 pm]


Streets of Rage: Silent Storm by mtrain
[December 07, 2012, 03:45:05 pm]


Site will be down for maintenance on 12/8/2012 thru 12/10/2012 by Damon Caskey
[December 07, 2012, 07:42:42 am]


Cancelled SOR 3d Remake by riccochet
[December 07, 2012, 03:58:33 am]


Dungeon Fighter: B.O.R. by msmalik681
[December 07, 2012, 03:24:27 am]


[TUTORIAL] How to create 4 Games of OpenBOR in 1 CD (650 MB) by magggas
[December 06, 2012, 09:46:25 pm]


custknife by Bloodbane
[December 06, 2012, 09:34:09 pm]


blockfx help by B.Kardi
[December 06, 2012, 04:09:14 pm]


street of age 4 hd by corradlo
[December 06, 2012, 01:41:36 pm]


ClaFan - Classic Fantasy ver 1.17 by soniczxblade
[December 06, 2012, 05:01:20 am]


Bug Archive by Bloodbane
[December 06, 2012, 02:00:44 am]


"Bio-Doom" and "Gears of Doom" by BulletBob
[December 05, 2012, 10:07:21 pm]


Contra Locked 'N' Loaded v2 by Bloodbane
[December 05, 2012, 09:39:43 pm]


Downloadable OpenBoR Manual by BeasTie
[December 05, 2012, 08:31:24 pm]


Having trouble testing changes by B.Kardi
[December 05, 2012, 03:05:53 pm]


DragonBall Absalon by msmalik681
[December 05, 2012, 02:52:13 pm]


[Hi-Res] Swamp by Vibrant
[December 05, 2012, 10:47:14 am]


  • Dot Guests: 150
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.



Author Topic: level up system  (Read 1457 times)

0 Members and 1 Guest are viewing this topic.

Offline Pierwolf

  • Sr. Member
  • ****
  • Posts: 348
    • Pierwolf's Magic chamber of abstract theories about relativity of Karma and metempsychosis
Re: level up system
« Reply #15 on: May 27, 2012, 12:38:21 pm »
thanks volcanic!

just downloaded, i'll test it and i let you know! thanks a lot to you all for the help!  :cheers!:

rafhot, please let me know if you succed in add your features to increase statistics too!

My current project:

Knights & Dragons: The Endless Quest - COMPLETE!

Offline rafhot

  • Hero Member
  • *****
  • Posts: 557
  • Raf Smash!
    • my creations
Re: level up system
« Reply #16 on: May 27, 2012, 08:35:18 pm »
it is hard to me to test and debug

its like a placebo effect  but without the right sintax command i dont have sure if it are working or not for offense and defense

Offline utunnels

  • Developer
  • Hero Member
  • *****
  • Posts: 2713
Re: level up system
« Reply #17 on: May 27, 2012, 08:47:52 pm »
The easiest way, like you mentioned above, is only record the level of a player in global variable list.

For example, setglobalvar("Fighter.level", 3)

And make a function which adjust character properties based on this level and call this function when necessary (level up, respawn, etc).

It can be complicated at the beginning since you have to do a lot of calculation, but once it's done, it is done.


Offline BeasTie

  • Hero Member
  • *****
  • Posts: 760
Re: level up system
« Reply #18 on: May 27, 2012, 10:09:37 pm »
How does this maxhealth work ? I been using another script that looks for maxhealth but I'm not sure how I'm supposed to set maxhealth for ents. Just adding maxhealth in the header is  not understood by engine, what's the right way to set it ?

(Trying to eventually add health bonus items using this)
« Last Edit: May 27, 2012, 10:12:11 pm by BeasTie »

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: level up system
« Reply #19 on: May 28, 2012, 11:59:13 pm »
 Example on how to set maxhealth and health:

Quote
changeentityproperty(vSpawn, "maxhealth", 200); //Set maximum health to 200
   changeentityproperty(vSpawn, "health", 100); //Set health to 100

 This example show that just because maximum health is set, doesn't mean current health should be same.
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline BeasTie

  • Hero Member
  • *****
  • Posts: 760
Re: level up system
« Reply #20 on: May 29, 2012, 01:10:35 am »
So it's just scriptside? in your thug.c script It has

getentityproperty(self,"maxhealth"); // Get caller's maximum health.

So i thought it could be declared in an entity header or something...

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: level up system
« Reply #21 on: May 29, 2012, 01:17:14 am »
 In thug.c script, the idea is random thug spawner spawns random enemy in level while the spawner removes itself after that.

 I added feature to copy the spawner's HP to spawned enemy so modders could control the latter in level text.

 Back to your question, you can give any value when altering entity property such as maximum health. In this thug.c, I copied spawner's HP and max HP for that purpose.

Quote
So i thought it could be declared in an entity header or something...

 I don't understand this
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline BeasTie

  • Hero Member
  • *****
  • Posts: 760
Re: level up system
« Reply #22 on: May 29, 2012, 01:32:54 am »
Just meant I thought I was supposed to do something like this in the enemies it was spawning.

Code: [Select]
name    someguy
type    enemy
health    100
maxhealth 200

Edit: Thanks for for the explanation of that script. :)

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: level up system
« Reply #23 on: May 29, 2012, 01:42:25 am »
 We don't have anything for that unfortunately. I believe it's assumed that every spawned entity starts with full health.
 Same goes with MP too.
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline BeasTie

  • Hero Member
  • *****
  • Posts: 760
Re: level up system
« Reply #24 on: May 29, 2012, 02:06:38 am »
Cool thanks Bloodbane, I think originally my problem was I diddn't realise enemies were copying HP from the spawner's HP as you said so I thought they were using the maxhealth property somehow when I had them spawn with too much health.

Sorry for clogging up the thread.

 



 0%




mighty
SimplePortal 2.3.3 © 2008-2010, SimplePortal