Users browsing this thread: 1 Guest(s)
PBG's ADVENTURE! (Yeah!)
#16
[Image: Ym6Plo4.png]

http://docs.yoyogames.com/source/dadiosp...sions.html

Use "div" for the division and "mod" for the remainder operator %.
Animations - MFGG TKO (scrapped) - tFR
[Image: QUmE6.gif]
"It feels that time is better spent on original creations" - Konjak
Focus on the performance, the idea, not the technical bits or details - Milt Kahl
Reply
Thanked by: Joxon
#17
FRIIIICK. I hate pestering people with questions instead of asking them all at once... Ok. This is the last one as there's no more errors afterwards. What exactly do you mean with the statement "i++" in the for statement? It comes up as an in correct statement when used.
[Image: rHiHaRN.jpg]
Reply
Thanked by:
#18
I don't mind.

"i++" is the same thing as saying "i = i + 1"
Animations - MFGG TKO (scrapped) - tFR
[Image: QUmE6.gif]
"It feels that time is better spent on original creations" - Konjak
Focus on the performance, the idea, not the technical bits or details - Milt Kahl
Reply
Thanked by:
#19
...I updated the engine... with WIP things. WIP bombs, WIP platforms, and... still WIP health. Just look at it. Its the white and black circles as i dont have a good sprite yet..

Check the first post for the link
My coding involving the health render:
Code:
DRAW EVENT:
for (i=0 ; i<maxhp; i=i+1)
{
if (i <hp)
draw_sprite(spr_heart_whole,0,posX, posY);
else
draw_sprite(spr_heart_empty,0,posX, posY)
}

STEP EVENT:
for (i=0 ; i<maxhp; i=i+1)
{
cellX = i mod 10;
cellY = i div 10;

posX = cellX * 16 + view_xview+1;
posY = cellY * 16 + view_yview+16;
}
[Image: rHiHaRN.jpg]
Reply
Thanked by:
#20
I am disappointed to see that you only added one health sprite Cry

I'm sorry that I don't have much else to say as there's not much to talk about. There's a bug. Holding down both move direction keys at the same time causes fast moon walking.
Animations - MFGG TKO (scrapped) - tFR
[Image: QUmE6.gif]
"It feels that time is better spent on original creations" - Konjak
Focus on the performance, the idea, not the technical bits or details - Milt Kahl
Reply
Thanked by:
#21
What do you mean one health sprite..? Also, that bug with both keys I'm just trying to find a good fix for. If this doesn't work out... I might just resort to a health bar with a health stat.
[Image: rHiHaRN.jpg]
Reply
Thanked by:
#22
[Image: 6tQuLbi.png]
Animations - MFGG TKO (scrapped) - tFR
[Image: QUmE6.gif]
"It feels that time is better spent on original creations" - Konjak
Focus on the performance, the idea, not the technical bits or details - Milt Kahl
Reply
Thanked by:
#23
Yeah... That's the problem. I think the horizontal cells aren't working right. I set up more than that. He's supposed to have 3...
[Image: rHiHaRN.jpg]
Reply
Thanked by:
#24
The last time I did a zelda heart-styled HP system I took the lazy route because I argue with for loops too much. Made a sprite with 4 subimages, 1 for each heart "quarter".

And then something like

DRAW EVENT
if life > 0
{if life > 3 draw_spritRolleyesxt(spr_hud_hp,3,view_xview[0]+xx,view_yview[0]+yy,1,1,0,-1,1)
else draw_spritRolleyesxt(spr_hud_hp,life-1,view_xview[0]+xx,view_yview[0]+yy,1,1,0,-1,1)
}
if life > 4
{if life > 7 draw_spritRolleyesxt(spr_hud_hp,3,view_xview[0]+xx+20,view_yview[0]+yy,1,1,0,-1,1)
else draw_spritRolleyesxt(spr_hud_hp,life-5,view_xview[0]+xx+20,view_yview[0]+yy,1,1,0,-1,1)
}

that's two hearts, no STEP EVENT interference.

I made that off top of my head so probably isn't reliable, and I don't suggest using it without testing.
Reply
Thanked by: Joxon
#25
Alright, I'm gonna try and get this project alive and running for a bit, again. If anyone can tell me what needs fixing ASAP (Other than placing bombs and the broken health "bar") if appreciate it. Otherwise, I'll start working on the bombs. It'll work this way; If you're standing and hit the bomb key, you throw it. If you crouch, you place it. Then, I'm cutting the ground roll, and start-up and ending lag to it, so it's harder than just jumping and pressing the attack button. Also, if you use it too close to the ground, you'll stumble, and be vulnerable to attacks for a second. Then, I need to find a better fix for the platforms you jump through, as when you're below it, the collision disappears, but that means other objects fall through it. It'll be appreciated if a script could be supplied for that, otherwise, I'll try something myself. I'll update y'all when I get there.
[Image: rHiHaRN.jpg]
Reply
Thanked by:
#26
AGH. So I added crouching, which works fine, land lag works fine, but... FOR THE LIFE OF ME THROWING WON'T WORK. It broke everything so I had to redo everything other than throwing. I should be able to just use the same system for throwing as I am slashing (Going into a state then creating the hitboxes at the right time). But it didn't work. I'll give it another shot later. I'll update the game later. Also, if anyone could help out with an RPG text box script, that'd be great.
[Image: rHiHaRN.jpg]
Reply
Thanked by:


Forum Jump: