Spawn projectile attacks while walking

danno

Moderator
Staff member
How do I spawn projectiles using the attack button without disturbing, stopping, stuttering walk animation?

single projectiles with each key press,

I tried using @cmd keyshoot but thats used during animation data and gives a machine gun attack if key is held
anything I change via keyscript disturbs the walk animation

In theory spawnbind with attack key press should work but I don't know how to do that.
 
Hey Kimono, I already looked at Bloodbane's Lock n' loaded, It is a machine gun attack and I need single key press attacks, also the walking is interrupted because the animation switches, hard to see because contra sprites are small and not many frames in the walk anims. 
 
figured it out... kinda

change Attack1 because it can overide IDLE and WALK anims,

In characters own keyscript use

Code:
void spawner(void vName, float fX, float fY, float fZ)
{	//Spawns entity next to caller and set them as child.
	//
	//vName: Model name of entity to be spawned in.
	//fX: X location adjustment.
	//fY: Y location adjustment
      //fZ: Z location adjustment

	int player = getlocalvar("player");
	void self = getplayerproperty(player, "entity");
	void vSpawn; //Spawn object.
	
	vSpawn = spawn01(vName, fX, fY, fZ); //Spawn in entity.

	changeentityproperty(vSpawn, "parent", self); //Set caller as parent.
        setentityvar(self, 1, vSpawn);    
	return vSpawn; //Return spawn
}

along with

Code:
    if(vAniID == openborconstant("ANI_WALK") ){ 
      if(iAttack){ //at?
       spawner("WRA", 0, 40, 0);

		}
	}

"WRA" Is an invisible entity which spawns a projectile , also used spawnbind for another entity on invisible entity to give special effects (gun fire) sure theres an easier way but that's how I did it

https://www.youtube.com/watch?v=hIEv7Du9t0k
 
Great work! Its my fav robocop game,  Id also make terminator playable and even ed 209.
I had plans to do something like this but i didnt tried walk and shoot yet, your method seems to work well, so you dont want people to just hold button and shoot all the time ?.
I think he also shot diagonally while walking ?
 
I wanted his default weapon to be a single key press, somewhere in the game a machine gun will be used and you'll be able to hold key a shoot multiples, I'm gonna create diagonal up and diagonal down walking shooting too, also RoboCop is 2 sided like Gill from Sf3 because I like to give myself head aches  ;D I'll need your help later on bWWd
 
Cool , i interpolated his walk for fun so its 20 frames, but its a mess to cleanup
next to original 10 frame animation
33pRL.gif
33pS2.gif

 
danno: I'm glad to you've found a solution to this problem. I would love to test a Robocop versus Terminator game :).
I've got some Robocop enemy sprites and can send you some resources if you need them. Keep up this great work!
x4Xu0WW.png

bWWd: Interpolation makes so smooth animations, can I try this method with some of my sprites if it's easy to do ?
 
Those interpolated sprites look nice and smooth, he looks even more robotic, is it difficult to do? I'd really like to try it out and see how it looks in-game,

Kimono thank you for the sprite sheet, I've ripped all the stages but I do need more so I welcome anything you have.
 
With this method using potplayer and double framerate filter it works fine on his thighs but lower than that it just creates 2 frames in one so if there is big motion it wont interpolate nicely but its still a good reference if you plan to use it as layer under animation to create those extra frames, you know where those frames should be and animation wont be that jerky if you would have to guess.
I also tried SVP method but it totally ignores sprites and just copies frame, it works when there is motion blur like movies and creates inbetween frame.
So i tried 2 methods  but potplayer (video player) works fast and nice, its actually filter than runs realtime , i just capture video to new file with this filter applied during playback.
O did not try dain method because it requires NVIDIA graphics card and CUDA on it.IT would be cool if someone could install it and run some stuff through it.
Also remember to upscale sprites 4x before applying those filters, then scale them down 25% with nearest neighbour.
https://www.youtube.com/watch?v=q2i6FXVjNT0
 
danno said:
I tried using @cmd keyshoot but thats used during animation data and gives a machine gun attack if key is held
anything I change via keyscript disturbs the walk animation

keyshoot is designed to shoot projectile when attack key is held and it won't affect animation

If you want to shoot single projectile with each key press, keyscript is the solution.
I can see that you have a modified keyscript there :). You don't have to use spawner function since spawn01 function is enough if you only want to spawn something
You could spawn the gun fire effect in keyscript also
 
Bloodbane  I used spawnbind for gunfire so it moves while Robocop walks. Is there a way I can just spawn gunfire and have it move with Robocop? because if so I can get rid of the invisble entity that fires projectile and use gunfire as an visual affect and projectile spawner

so in theory

Code:
    if(vAniID == openborconstant("ANI_WALK") ){ 
      if(iAttack){ //at?
       bindentity("WRA","robocop", 0, 40, 0);

WRA entity

Code:
	frame	data/chars/robo/fire2.gif
	@cmd	shooter "bullets" 60 22 0 0
	frame	data/chars/robo/fire.gif

something like that

bWWd

I can see how capturing frames from video would be messy to clean up, do these programs output single images too I did a tiny bit of searching and came across Smooth Doom, looks amazing, I'll research some more.
 
danno: I hope that you've don't spend too much time ripping stages, they are available at vgmaps since 2015:
https://vgmaps.com/Atlas/Genesis/index.htm#RoboCopVersusTheTerminator

bWWd: Do you think you can make a tutorial about sprite interpolation? I'm sure that this will interest a bunch of Openbor/Mugen makers.
 
I found very interesting software for interpolation ,its called intersprite, and i got really decent result with robo
Here is 20 frames, one extra interpolated frame inbetween
33ric.gif

Great thing about it is that it can create even 10 interpolated frames, here i created 3 frames so its 40 frames of animation, original had 10
33riv.gif

So if i wer You guys i would use that instead of video interpolation.
Here is tutorial for that:
https://www.youtube.com/watch?v=E_-D0M87GWY

Its quite long but basically you have layers on side which tell what body part is behind what etc, you can rename them above tools, so you paint over body parts highlighting them, once you do all frames painted then you add bones , its that tool next to eraser. And when you finish applying bones then now you can interpolate, it wont interpolate without bones .
Id leave morphs disabled.Also when painting body part just paint entire bodypart shape like it really is when its obscured by something in front of it then dont stop paintng , this way you will get very usable animation.
In case of a problem i can upload this robo project fo you to see.
One more test i did with ermac, interpolated to 40 frames
33ro2.gif
33ro9.gif

IMO results are very promising , it takes time to separat and paint limbs tho, and i hope there will be some sort of stabilisation
 
kimono said:
I hope that you've don't spend too much time ripping stages, they are available at vgmaps since 2015
only about 5 hours  :'( I did check vgmaps some months ago but the website was down, Thank you very much kimono what you have sent has been very useful.

bWWd said:
This looks great, Lots of touch ups and reworking need to be done on the sprites and its something I'd prefer to use on my own creations rather than pre existing sprites, I'm working on 3 games at the moment, spiderman, shinobi and robocop but I want to re draw the shinobi game and use my own hand drawn sprites for it so this will come in handy for that game

https://www.youtube.com/watch?v=tXdpNXcmvfc&feature=youtu.be
I've been working on diagonals and the two sided character aspect, I remembered that aiming diagonal will interrupt animations because they switch but It's definitely beyond me how to switch between all animations smoothly, still tryna figure out spawn binding  in keyscript so I can get rid of invisble entity's
 
Robocop deserves to be released before a shinobi or spiderman game. This universe doesn't exist currently at Openbor, I'd love to try this kind of run and gun game :).
The Terminator on SegaCD has got also some cool visuals too and is a very nice game:
242836.png

https://www.spriters-resource.com/genesis_32x_scd/theterminator/
Keep up the good work ;)
 
use sync feature , it goes to walk animation and  other walkor even run, so in walk and run you place sync walk run and when animatuon will switch from one to the other the frames will match.
 
does sync work with all animations or just some? also can you show me some text based examples, can't seem to get it to work.

kimono The Terminator is not going to be in this game however there will be and unlockable character that is more agile and run n' gun style, wanted Robocop to have a more heavy but precise feel while the hidden character will be faster and wild
 
IN IDLE
sync walk
sync follow1

To make it syncronised when switching to walk or follow1 and back to idle
Or
sync run walk idle

In all 3 animations ( walk run and idle
works with all anims

One of those will work i think the second option
 
danno said:
Bloodbane  I used spawnbind for gunfire so it moves while Robocop walks. Is there a way I can just spawn gunfire and have it move with Robocop? because if so I can get rid of the invisble entity that fires projectile and use gunfire as an visual affect and projectile spawner

Hmmmm.... what about this?
Code:
 if(vAniID == openborconstant("ANI_WALK") ){ 
      if(iAttack){ //at?
        spawnbind("GunFlash", 0, 40, 0, 1, 0);
       shooter("Bullets",60,22,0);
 
Back
Top Bottom