* *
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 20, 2017, 01:55:36 PM

Login with username, password and session length

custom fall reactions in OpenBor

  • 12 Replies
  • 447 Views
*

Offline nedflandeurse

  • Hero Member
  • *****
  • 2066
  • I think I'm feeling better, but frozen project ATM
custom fall reactions in OpenBor
« on: September 24, 2017, 03:59:56 AM »
Hello,
I have not coded something for several months now due to IRL stuffs.
I think I can possibly go on now. I'm trying to see if this is possible with this engine.
And more importantly, HOW, this can be done.
This is a very very very very very simplified version of what I had initially in my mind. To make it possible to be done without having one more break in my possible future project.

Basically : a fall anim with custom fall reactions based on interactions.


I would really appreciate to have some support and help to code what this mockup shows.

If this is still too ambitious, or if it takes too much of your time, I would understand.
No problem. Thanks for your support.
(ON HOLD) my game system. W.A. Project. (ON HOLD)

*

Offline maxman

  • Hero Member
  • *****
  • 1340
  • A.K.A. Ermax619
    • Atlas Productions - Cavern of Creativity
Re: custom fall reactions in OpenBor
« Reply #1 on: September 24, 2017, 07:01:03 AM »
For screen edge, it can be done using variants of x position and horizontal screen, along with entity's x coordinate (not variant) under fallxx anim you mentioned. If the victim goes against the screen, change the victim's facing during his fall. When the victim falls off to hit the screen, do you want him to keep rolling to lie down after he hits the screen? Or do you want him to go with the first frame of the same animation AFTER he touches the screen?

If you don't know what I mean, look at this:

Code: [Select]
anim fall17
@script
void self = getlocalvar("self"); // Get entity
int x = getentityproperty(self, "x"); // Get entity's x coordinate
int HRes = openborvariant("hresolution"); // Get horizontal resolution of the screen
int Xpos = openborvariant("xpos"); // Get x position, not from entity itself

if(x > Xpos+HRes-45){ // Entity next to the right side of the screen edge and going against it
   changeentityproperty(self, "direction", 0); // Change entity's facing to the left
}else if(x < Xpos+45){ // Entity next to the left side of screen edge and going against it
   changeentityproperty(self, "direction", 1); // Change entity's facing to the right
}
@end_script
delay 23
offset 31 111
move 4.7
frame data/chars/jack/fallen401.png
delay 11
frame data/chars/jack/fallen402.png
frame data/chars/jack/fallen403.png
frame data/chars/jack/fallen404.png
frame data/chars/jack/fallen405.png
frame data/chars/jack/fallen406.png
frame data/chars/jack/fallen407.png
frame data/chars/jack/fallen408.png
frame data/chars/jack/fallen409.png
frame data/chars/jack/fallen410.png
« Last Edit: September 24, 2017, 05:32:02 PM by maxman »
Projects in Progress:
Dragon Duo (on hold)
Captain Commando (CPS2/MVC style) (on hold)
Unelmia (on hold)
Secret project (on hold)
Double Dragon Remake (in progress)
Castlevania Rebirth (on hold)

Misc.:
Openbor Tutorials (to be resumed later on)

*

Offline nedflandeurse

  • Hero Member
  • *****
  • 2066
  • I think I'm feeling better, but frozen project ATM
Re: custom fall reactions in OpenBor
« Reply #2 on: September 24, 2017, 12:52:42 PM »
Yes, after hitting the wall or edge, it restart the animation in the opposite way.

In fact, I think I have a base of script that can be used for wall bounce and edge bounce.

The major problem is how to make it happen when hitting obstacle or character


EDIT : one more precision.
The initial move is an attack, hitting enemy and sending him in a custom pain anim (or fall)
But I dont know how to make the opponenet sliding on the ground until he hits something or falls. ???
« Last Edit: September 24, 2017, 02:29:25 PM by nedflandeurse »
(ON HOLD) my game system. W.A. Project. (ON HOLD)

*

Offline Damon Caskey

  • Administrator
  • Hero Member
  • *****
  • 1760
    • DC Current
Re: custom fall reactions in OpenBor
« Reply #3 on: September 24, 2017, 09:24:49 PM »
Don't code this directly into fall animations, you're making it harder than it is that way. Use the "onblock" events - that's specifically what they are there for. They run whenever an entity's movement is stopped by obstacle, walls, screen boundaries, and so on.

Then you check for falling status and set up your reaction accordingly. I have an old script I used for wall bounce in 2009. I'll see if I can update it this week.

DC
Projects in progress are now available here: https://github.com/DCurrent

*

Online msmalik681

  • Hero Member
  • *****
  • 781
Re: custom fall reactions in OpenBor
« Reply #4 on: September 25, 2017, 06:39:07 AM »

Just a idea but your fall animation could have a blinded entity with a attack box with a follow animation that manipulates the falling players animation should work for people and obstacles.  Like DC said a onblock script can help when hitting walls.  Check out this example mod I made to show how to climb up platforms it uses a onblock script.




*

Offline nedflandeurse

  • Hero Member
  • *****
  • 2066
  • I think I'm feeling better, but frozen project ATM
Re: custom fall reactions in OpenBor
« Reply #5 on: October 03, 2017, 05:49:02 PM »
thanks
Sorry, I don't understand what to do.
I thnik, I'll have to give up one more time or simplify the system even more.
I think wall damage/edge damage is OK since I used something similar for fall anims in the past.

I still don't have any idea how to make an enemy slide on the ground during the pain anim.
slide slowly like a run or walk would do...
(ON HOLD) my game system. W.A. Project. (ON HOLD)

*

Offline nedflandeurse

  • Hero Member
  • *****
  • 2066
  • I think I'm feeling better, but frozen project ATM
Re: custom fall reactions in OpenBor
« Reply #6 on: October 08, 2017, 05:58:10 PM »
I think I'll try to resume this system. and point the elemnts where I need help.
(I had to make several drawn sketches event to think how I would expose my coding problem here)

-player sends enemy into a "slide/run" anim
how to send enemy into a custom "get hit" anim?
For the moment, it is an attackbox actually hitting opponent into this gethit anim "attackone 1" but I'm OK to change it if theres is better idea.
Hopefully, it can borrow the regular run anim of the entity and plays it in loop (instead of a get hit anim)
how to give this enemy a sliding/runing type velocity?
The idea would be to play this run in a loop (with the step sound effects) but with an attack box.
Do I have to create a full new anim for openbor?

-after the slide, enemy change to a "front fall anim"
(It happens after a certain time enemy played this run anim)
(How to change this anim to fall anim based on time?)

-during the "slide/run" these are the possible reactions.
   -hit wall (not edge)
   (how tho apply a onblock script for this situation?)
   plays a bounce sound
   turn around
   then plays the "front fall anim"
   (can it use the same "front fall anim" but plays a bounce sound before?)
   
   -hit enemy or other character
   simply hitting opponents with it's constant attack box
   (nothing complicated for me here)
   
As an explanation, there is no more rope interaction in this game, this is too hard.
I just would like to complede this "send into wall" damage to have the regular game system completed.

Sorry, it's really difficult even to understand myself how it could work.
As an artist and art teacher, I'm more into instinct stuff like imaginative stuff and art.
Maths and coding logic is not my stuff (at all)
And english is not my language.

Thanks
(ON HOLD) my game system. W.A. Project. (ON HOLD)

*

Offline Damon Caskey

  • Administrator
  • Hero Member
  • *****
  • 1760
    • DC Current
Re: custom fall reactions in OpenBor
« Reply #7 on: October 09, 2017, 09:55:22 AM »
...

Allof these things can and should be handled the same way - with use of a controller entity. Controller entities are models you set up specifically to spawn into play and temporarily control the actions of a target entity. One common example would be burning effects. The burn spark forces the entity that is burning to have an orange tint until it (the burn spark) is removed from play, at which point it turns the tint effect off.

The advantage to such an approach is it abstracts the special action, and removes it entirely from the the main entity. It thus becomes more dynamic and reusable. IOW, once you have it working, it's just a matter of spawning it in, linking it up to  the target entity and everything works from there.

Quote
-player sends enemy into a "slide/run" anim

When this action takes place, you can spawn an invisible controller entity that is bound to the target (enemy) and and has an update script that forces the enemy to move at whatever velocity you want, while also playing its RUN animation. This way, the attacking entity controls the run speed, and you get to reuse the target's RUN animation. After a certain amount of time (using lifespan), the controller entity kills itself, and when it does so, puts the target into a forward fall.

The attacking portion is a little trickier, so let's handle things step by step. See if you can get the "running" part down, and I'll show you how to put in an attack next.
Projects in progress are now available here: https://github.com/DCurrent

*

Offline nedflandeurse

  • Hero Member
  • *****
  • 2066
  • I think I'm feeling better, but frozen project ATM
Re: custom fall reactions in OpenBor
« Reply #8 on: October 15, 2017, 04:25:06 PM »
Thanks DC.
Not sure to understand everything, but I'll give it a try.
Hope I can make the first part working.
(ON HOLD) my game system. W.A. Project. (ON HOLD)

*

Offline nedflandeurse

  • Hero Member
  • *****
  • 2066
  • I think I'm feeling better, but frozen project ATM
Re: custom fall reactions in OpenBor
« Reply #9 on: October 17, 2017, 05:38:53 PM »
I tried the last days and almost tried to undertand it during the full day, even at work/job.
But, no way for me to understand it.

I got the logic of why a controller entity have to be used, but I have no clue how to code it.
Is there template of code or exemple in a mod of how to make it?
(ON HOLD) my game system. W.A. Project. (ON HOLD)

*

Offline dantedevil

  • Hero Member
  • *****
  • 1435
  • Dante
Re: custom fall reactions in OpenBor
« Reply #10 on: October 19, 2017, 01:23:20 AM »
Well dear friend, I think I have been able to solve all the movements that you indicate here:

Here you can see a simple demo that I did, to test all the movements:
https://youtu.be/caVzSt_VJ1k

And here's the little demo, so you can implement everything.
Hope this can help you...
https://www.mediafire.com/file/tuk5th7npewosz1/Ned%20moves.rar
Dantedevil

*

Offline nedflandeurse

  • Hero Member
  • *****
  • 2066
  • I think I'm feeling better, but frozen project ATM
Re: custom fall reactions in OpenBor
« Reply #11 on: October 19, 2017, 01:01:45 PM »
My friend, thanks a million for it!
This is something I had in my mind for almost 3 years now.
It took me almost 1 year to explain correctly it.

I really really appreciate this help you given.
Thanks a lot for your time.

I'm still testing, then and I'm about to adapt it for my mod project.
And finally complete the game system, then code the actual game levels, characters...
God bless you  :)
(ON HOLD) my game system. W.A. Project. (ON HOLD)

*

Offline dantedevil

  • Hero Member
  • *****
  • 1435
  • Dante
Re: custom fall reactions in OpenBor
« Reply #12 on: October 19, 2017, 01:14:39 PM »
My friend, thanks a million for it!
This is something I had in my mind for almost 3 years now.
It took me almost 1 year to explain correctly it.

I really really appreciate this help you given.
Thanks a lot for your time.

I'm still testing, then and I'm about to adapt it for my mod project.
And finally complete the game system, then code the actual game levels, characters...
God bless you  :)

Those are great news!
I'm really glad that I helped you.
I hope that now you can continue advancing with your great Mod.
And if in any way I can help you, do not hesitate to let me know. ;)
Dantedevil

 

Recent

Members
Stats
  • Total Posts: 46532
  • Total Topics: 3188
  • Online Today: 46
  • Online Ever: 316
  • (January 04, 2013, 09:43:02 AM)
Users Online
Users: 4
Guests: 46
Total: 50