Xlithan Posted February 27, 2012 Author Share Posted February 27, 2012 I think something was missed out of the last tutorial that was posted about adding an attack frame because it didn't work for me, so here's one that works if anybody else had trouble.Now then. If your sprites are 32x32 each, add an extra 32 pixel width to your sheet and do your extra frame there.Look for **Public Sub BltPlayer**, and do the following within that sub.Replace:``` If Player(Index).Attacking = 1 Then Anim = 3 End If```With:``` If Player(Index).Attacking = 1 Then Anim = 4 End If```Replace:``` .top = spritetop * (DDSD_Character(Sprite).lHeight / 4) .Bottom = .top + (DDSD_Character(Sprite).lHeight / 4) .Left = Anim * (DDSD_Character(Sprite).lWidth / 4) .Right = .Left + (DDSD_Character(Sprite).lWidth / 4)```With:``` .top = spritetop * (DDSD_Character(Sprite).lHeight / 4) .Bottom = .top + (DDSD_Character(Sprite).lHeight / 4) .Left = Anim * (DDSD_Character(Sprite).lWidth / 5) .Right = .Left + (DDSD_Character(Sprite).lWidth / 5)```Replace:``` ' Calculate the X x = GetPlayerX(Index) * PIC_X + Player(Index).XOffset - ((DDSD_Character(Sprite).lWidth / 4 - 32) / 2)```With:``` ' Calculate the X x = GetPlayerX(Index) * PIC_X + Player(Index).XOffset - ((DDSD_Character(Sprite).lWidth / 5 - 32) / 2)```Save, test. Link to comment Share on other sites More sharing options...
Wing Posted February 27, 2012 Share Posted February 27, 2012 The extra frame won't play while walking, right? Link to comment Share on other sites More sharing options...
Xlithan Posted February 27, 2012 Author Share Posted February 27, 2012 Nope Link to comment Share on other sites More sharing options...
Wing Posted February 27, 2012 Share Posted February 27, 2012 @Xlithan:> NopeNo, as in it does play while walking, or no as in it doesn't. Link to comment Share on other sites More sharing options...
Xlithan Posted February 27, 2012 Author Share Posted February 27, 2012 I believe the topic is "Attack Frame - Working"If the attack frame displayed whilst you were just walking, it wouldn't be working correctly, would it? ;) Link to comment Share on other sites More sharing options...
Wing Posted February 27, 2012 Share Posted February 27, 2012 @Xlithan:> I believe the topic is "Attack Frame - Working"> > If the attack frame displayed whilst you were just walking, it wouldn't be working correctly, would it? ;)Just checking ;p. Nice Tutorial. Link to comment Share on other sites More sharing options...
Whackeddie99 Posted February 27, 2012 Share Posted February 27, 2012 this works fine. What it does not do is show the animation to other players. I am going to tackle that tonight, and I'll maybe share it with the community. Link to comment Share on other sites More sharing options...
Xlithan Posted February 27, 2012 Author Share Posted February 27, 2012 Yeah, but that was the case prior to the tutorial. This only shows how to add the extra frame. Displaying it globally was my next job but feel free to share it if you do figure it out before me. Link to comment Share on other sites More sharing options...
Whackeddie99 Posted February 27, 2012 Share Posted February 27, 2012 @Xlithan:> Yeah, but that was the case prior to the tutorial. This only shows how to add the extra frame. Displaying it globally was my next job but feel free to share it if you do figure it out before me.Yeah, I'm not sure I'll do this right away. It turns out you need to edit paperdolls to work right aswell Link to comment Share on other sites More sharing options...
Robin Posted February 28, 2012 Share Posted February 28, 2012 Way too many people have trouble adding new frames. Why not change all the '5's to a global constant so people don't get confused in the future? I might end up doing that with my shit. Link to comment Share on other sites More sharing options...
Xlithan Posted February 28, 2012 Author Share Posted February 28, 2012 Yeah I guess you could do that as well. Depends if you plan on actually adding more than 1 extra frame in the future.From an engine perspective I can see the benefit, it's one less thing for people to make an effort for, when they can just edit 1 number.But coding an engine and coding a game are 2 completely different things.Most of the things you see in external files can be hard coded. The only reason why some things are in external files, especially in older Mirage source is because they were based on closed source engines, which meant having to have these external files in order for the admin to make changes, like having a data file with all the MAX_ shit that can just be hard coded. Even the options.ini and classes.ini can be hard coded once you've gotten the stats set up right.Unless it's something which will change frequently, hard code it, reduce the amount of files your game uses.I think Robin pretty much had this in mind when he made Eclipse Origins so it's not such an issue in this version. Link to comment Share on other sites More sharing options...
donovanvaught Posted March 18, 2012 Share Posted March 18, 2012 so has anyone tackled the global animations yet? I've been busting butt on it, and only making glitchy solutions. Hoping to get pointed in the right direction…. Link to comment Share on other sites More sharing options...
Keny14 Posted March 18, 2012 Share Posted March 18, 2012 No, not yet. ^^' Link to comment Share on other sites More sharing options...
mrmiguu Posted March 18, 2012 Share Posted March 18, 2012 Good luck getting these "new frames" to show up on other players playing your game(s).If you want direction, look at how movement frames are kept synchronous with the server and other players (attack frames don't show up on other players either). Link to comment Share on other sites More sharing options...
EntityJin Posted March 18, 2012 Share Posted March 18, 2012 @iXlithan Thanks man, this really helps me. I converted this to work with the paperdoll, it's not hard. I also converted this to work with NPCs, which i think is very useful. I'm going to try and figure out how to get this to work globally.@MrMiguu Thanks for the tip, That's exactly what I plan to do. Link to comment Share on other sites More sharing options...
donovanvaught Posted March 19, 2012 Share Posted March 19, 2012 Well from what I've seen so far, bltplayer handles the rendering of all the players on the same map as you. So seeing that, I placed code that would find out who is attacking, set them to attacking on my client, then blt THAT player, with attacking set (along with the attacktimer) it should render the person attacking, but it's not blting properly, it only shows the first frame until my character attacks, then it "catches up" so to speak. Link to comment Share on other sites More sharing options...
mrmiguu Posted March 20, 2012 Share Posted March 20, 2012 @Deathfissure:> Well from what I've seen so far, bltplayer handles the rendering of all the players on the same map as you.Not exactly.It handles variables to determine frames, as well. The only frame that correlates to every player on the same map as you is the _.Step_ variable for the player. That determines movement frames. Link to comment Share on other sites More sharing options...
Robin Posted March 20, 2012 Share Posted March 20, 2012 How is it a problem showing globally? Works just fine.The only issue Origins has in this regard is that the server will not send out the attacking packet if you're not actually attacking anything.Move the attack packet to the start of the battle logic so it doesn't get skipped on an early exit and it should work just fine.Showing things 'globally' is just a case of keeping people's clients synced whilst keeping data usage to a minimum. It's a juggling act, but not a hard one. Link to comment Share on other sites More sharing options...
donovanvaught Posted March 20, 2012 Share Posted March 20, 2012 Done and Done, I owe you again Robin, I had to go all the way back and look at original release (I've changed SO MUCH) then had to go in and tweak it to work for my animated/combo system, but it's starting to work, just need to do a few more tweaks… Thanks again Robin! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now