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: 142
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.



Author Topic: Time Limited Boost effect  (Read 346 times)

0 Members and 1 Guest are viewing this topic.

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Time Limited Boost effect
« on: November 23, 2012, 11:17:47 pm »
 I am making boost spell with script to increase offense power temporary. I know how to increase and decrease offense.
 The question is: how to give time limit for this boost effect?
 It crossed my mind to set another script to cancel the effect in another animation but I would have to set the script in many animations since I can't be certain at which animation, the effect should wear out. I am hoping there's better way :).
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

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

Offline utunnels

  • Developer
  • Hero Member
  • *****
  • Posts: 2713
Re: Time Limited Boost effect
« Reply #1 on: November 24, 2012, 12:12:01 am »
Hint:

You can spawn another entity as a supervisor if you don't want to put too many things in your character's update script.

The supervisor can do various things, include checking defense/offense. When the job is down it can just kill itself. Just assign it a task by specify a special alias or set some entity variables (for example, the handle of your character).

Offline Damon Caskey

  • Hero Member
  • *****
  • Posts: 5335
    • The Gorge
Re: Time Limited Boost effect
« Reply #2 on: November 24, 2012, 03:55:54 am »
I'm a big fan of the controller entity technique, and with it you can often kill two or more birds with one stone. For example, I have a character that can throw dirt to blind opponents. Since there is no tracking variable for perception, I spawn a bound entity on the blinded victim.

This entity does double duty of providing a visual effect for players and acts as a timer. When its lifespan expires the parent's perception parameter is set back to reflect the amount it was affected by the blindness entity (I do this in place of static values so I can have compound effects if I want). IOW:

Blindness entity spawn: Parent perception = Current perception - 10.
Blindness entity expire: Parent perception = Current perception + 10.

This technique is also a boon when you want to manipulate the effect later. Let's say in my case there was a cure spell for the blindness. Instead of trying to work up math on the perception variable which might be tracking several vision effects in a complex RPG, all I have to do is look for the "blind" entity and kill it.

You don't even need to have the other entity be bound. Maybe you don't want anything visible on your "boosted" entity but players should still have some kind of visual confirmation. So maybe the control entity could be down by the HUD displaying some text like "BOOST!" or whatever. Lot of different ways you could do this.

DC
« Last Edit: November 24, 2012, 04:14:03 am by Damon Caskey »
OpenBOR Wiki.

Coming Soon:
Spoiler
Fatal Fury Chronicals


Offline rafhot

  • Hero Member
  • *****
  • Posts: 557
  • Raf Smash!
    • my creations
Re: Time Limited Boost effect
« Reply #3 on: November 24, 2012, 10:38:28 am »
it will be very useful to marvel wargems and the powerups im trying to do :P

Offline BeasTie

  • Hero Member
  • *****
  • Posts: 760
Re: Time Limited Boost effect
« Reply #4 on: November 24, 2012, 05:13:17 pm »
Yeah I been wondering about how to do this kind of thing too.  For doom powerups on timers like bezerk.

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: Time Limited Boost effect
« Reply #5 on: November 24, 2012, 06:57:47 pm »
Quote
Let's say in my case there was a cure spell for the blindness. Instead of trying to work up math on the perception variable which might be tracking several vision effects in a complex RPG, all I have to do is look for the "blind" entity and kill it.

 Hey! that's brilliant! thanks for sharing Damon!  :cheers!:
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

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

 



 0%




SimplePortal 2.3.3 © 2008-2010, SimplePortal