Is there an Event System?

This might have been asked before, so if it has been then feel free to lock / delete this thread after letting me know the previous solution to this.

I'm just about to finish my Game Design Document and I've been thinking hard about how to make my game fun while also telling a simple story without breaking immersion. I think I might be in a need of an "Event System". Allow me to explain:

Do you remember the very first Streets of Rage / Bare Knuckle where you could use a "special", the characters stop / pause, the camera pans back, a police car arrives and somebody shoots a bazooka at the enemies you're facing? How do you create such an animation or event in OpenBOR?

Not just for attacks, but a system like this that can work pretty much anywhere. It could be something as simple as allowing object sprites in the background to flash after beating a boss, or as complex as a particular NPC watching you brawl some dudes, but when you run past it and step onto a specified section of a map, that NPC runs towards you, does some animation (and possibly your character animates something back, as if interacting with it), then that NPC turns into a boss. Basically this kind of thing could be used to "trigger events" in-game, much like in RPG Maker XP but doesn't have to be exactly like it.

From a design perspective, this kind of thing would actually keep the player immersed in the game itself rather than constantly break the pace with animated videos (which would take a longer time to develop and increase file-size anyway. If I could figure out how to do any of that with little to no coding it'd be amazing (since I'm more of a designer / artist than a coder). Existing OpenBOR parameters are fine.

Also, off on a tangent but is there a way for me to "code features while learning" in OpenBOR via simpler scripts and ideas, rather than "learn everything first then code"? As I said, I'm not a coder (I don't know any of it), but I don't mind trying to learn it if it can help me.
 
Tushant Mirchandani said:

What you are speaking of does exist, and can be seen in action within several modules. But to take advantage of it, you simply have to start from the ground up. There's no getting around it.

The "easy mode" of OpenBOR as it were, is designed for flowing action and multiple units on screen - stuff fighting other stuff continuously on a scrolling X, Y, Z, plane.

It has the capacity to do anything else you can imagine, but the default behaviors are meant to be simple as possible while still fully functional as a Streets of Rage style game, and that's what you're going to get until you learn the basics of game design and coding.

DC
 
I too started here as a artist with a idea and no intention to learn coding. After picking up the basics coding can really help you un-restrict  what you want to do with your game.


In my opinion if you can write animation / frame data in openbor then you have the ability to code you just need to know what parameters you can work with here is a great place to reference I have it bookmarked and refer to it all the time.


When I started out this file helped me a lot its a bit dated but it covers all the basics. I still reference it these days as it has a handy search feature.
 
Heya, thanks for the reply! I was actually wondering if some of those things could be achieved via work-arounds. For example: The "flashing NPC objects once a boss dies" can probably be recreated with the use of spawnframe where the spawned entity's type is none. But there are certain instances where I can't escape from scripting — even though I can just as easily get away with having a large image with mostly empty space on the right of the enemy, placing the base coordinate there and simply animating it running towards that co-ordinate with distance like properties, I could also just as easily rely on changeentityproperty if I knew how to code.

(That said, how DO people get enemies walking out of a building to challenge you anyway?)

Yeah, I have taken a look at Utunnels' script manual before, and it is a helpful and comprehensive list. Problem is, I'm still having a hard time understanding how to use it due to my lack of scripting skills (I know, I probably sound pretty dumb here but I swiftly pick things up after passing the first hurdles).

That's why I was wondering if there was some learn by doing kinda thing (or a simple tutorial) available somewhere, like an item that spawns "Hello World" dialogue box or something. If I can learn that I'd be able to give myself the liberty to do interesting stuff rather than constrain myself to the basics of the engine and only finding artistic routes.
 
How do you create such an animation or event in OpenBOR?

It's not easy but not too complex either. What you need to do are:
1. Pause every active fighters excluding the police car
2. Set both players to be unaffected by screen IOW set subject_to_screen 0 to both
3. Move the screen to the left with script
4. Spawn the police car and let it animate
5. Move the screen back to the right with script
6. Spawn the explosion, effects, shots etc
7. Reset player's subject_to_screen
8. Unpause players

That should cover most if not all

That's why I was wondering if there was some learn by doing kinda thing (or a simple tutorial) available somewhere

Hmmm... we don't have such things yet but if you'd like to learn scripting, you can start from simple things such as modifying player's properties via script
 
Don Drago said:
Tushant Mirchandani said:
(That said, how DO people get enemies walking out of a building to challenge you anyway?)
That's the easiest part. You may use a custom "spawn" to achieve this effect. No script needed.
Thanks!

Bloodbane said:

Alright, I'll see if I can get my head around to do that. I really have no experience in C so I don't know how things work (the most I've dabbled with is HTML and CSS). If I'm still confused I'll probably ping back on this thread.
 
Hello, welcome to the forum.
(That said, how DO people get enemies walking out of a building to challenge you anyway?)

You can use a little script right in the level.txt to spawn an enemy into a specific animation, take a look:

spawn Gunner
@script void main() {
  performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW3"));
} @end_script

coords 210 189 0
health 1
at 0

With this, the engine will spawn the entity called Gunner in his FOLLOW3 animation.
You can see this in action in this video - I used this trick a lot
https://www.youtube.com/watch?v=msrx_ZTlYEg
 
Thanks for the script, Ilusionista! Though, could I ask you how I'd be able to recreate by hand that script you shared? I could try reverse engineering it for various purposes (with the help of Utunnels' script reference), but I'd still have no idea how, where and why things like void main ought to be used (for example).

There's also a lot of cool stuff in your mod video, such as an animated intro where a truck runs over some goons right before the player characters appear, or the large hangar door opening after beating two golem bosses, or the dialogue box and description when the final boss appears, etc. I'd love to be able to try to replicate things like those.
 
Back
Top Bottom