[XP] Blizz-ABS

Started by Blizzard, January 09, 2008, 08:21:56 am

Previous topic - Next topic

Ragnai

Thanks a lot Blizzard (:
Couldn't you make an extra thread where we could post our ideas in?
And you would reply with: possible, not possible?

Thanks in advance, I'll be waiting.

~Ragnai

Blizzard

No, this thread is fine. It's for support and suggestions. There's no need for 2 threads.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

RoseSkye

What's the snippet to check actor hp?

Blizzard

$game_party.actors[POSITION].hp
$game_actors[ID].hp
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

RoseSkye

Quote from: Blizzard on October 04, 2009, 07:52:30 am
$game_party.actors[POSITION].hp
$game_actors[ID].hp



Im sorry I didn't mean it that way. How do I check the amount of hp an actor has with conditional branches.

Example. Actor 2 has 25% hp and I want to use a conditional branch to trigger stuff when that happens.

Ryex

($game_party.actors[POSITION].hp.to_f / $game_party.actors[POSITION].maxhp.to_f) < .25 


position starts at 0 and goes to party size - 1
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

No need for 2 times to_f. If one number is converted to float, then every integer operand will be converted to float as well. Also the brackets aren't necessary.

@Rose: You can use this code in an event conditional branch. 4th tab, the option says "Script".
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

RoseSkye

Quote from: Blizzard on October 04, 2009, 02:25:58 pm
No need for 2 times to_f. If one number is converted to float, then every integer operand will be converted to float as well. Also the brackets aren't necessary.

@Rose: You can use this code in an event conditional branch. 4th tab, the option says "Script".


I know that but I remember Z' (Zeriab) giving me a snippet that was like actor.hp = blahblahblah.. and I forgot.
The snippet checked to see if an actor's hp was at a certain percentage.

Aqua

Quote from: Ryexander on October 04, 2009, 02:00:39 pm
$game_party.actors[POSITION].hp.to_f / $game_party.actors[POSITION].maxhp < .25 


position starts at 0 and goes to party size - 1


There it is... >.>

RoseSkye

October 04, 2009, 03:51:14 pm #2509 Last Edit: October 04, 2009, 04:14:03 pm by RoseSkye
Quote from: Aqua on October 04, 2009, 03:41:39 pm
Quote from: Ryexander on October 04, 2009, 02:00:39 pm
$game_party.actors[POSITION].hp.to_f / $game_party.actors[POSITION].maxhp < .25 


position starts at 0 and goes to party size - 1


There it is... >.>


=O I overlooked that...

Doesn't work for some reason. I put position 1 because its checking actor 2.. 'sides that I want to check a specific actor so I can have individual commands. (Might be because of the BlizzABS.. last time that's what happened when Z' gave me a command like that)

Aqua

$game_actors[ID].hp.to_f / $game_actors[ID].maxhp < .25 


There XD

RoseSkye

I tried that.. syntax error

Blizzard

Don't use ".25", use "0.25".

And remember kids:
Writing cryptic code is NOT cool. You do not come over as smart or witty because you know some syntactic sugaring. Rather you come over as 0|\/|6 1337 h4xxorz. Do you want to be called a 13 year old boy who thinks he's a hacker? No, you don't. So don't use syntactic sugaring. Especially if the language doesn't support it.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Aqua

I only copy pasta'ed what Ry did D:

RoseSkye

Quote from: Blizzard on October 04, 2009, 06:09:52 pm
Don't use ".25", use "0.25".

And remember kids:
Writing cryptic code is NOT cool. You do not come over as smart or witty because you know some syntactic sugaring. Rather you come over as 0|\/|6 1337 h4xxorz. Do you want to be called a 13 year old boy who thinks he's a hacker? No, you don't. So don't use syntactic sugaring. Especially if the language doesn't support it.


... feh... for some reason I feel like he just said something about my mother.

Zeldaknight

Quote from: Blizzard on October 04, 2009, 06:09:52 pm
Don't use ".25", use "0.25".

And remember kids:
Writing cryptic code is NOT cool. You do not come over as smart or witty because you know some syntactic sugaring. Rather you come over as 0|\/|6 1337 h4xxorz. Do you want to be called a 13 year old boy who thinks he's a hacker? No, you don't. So don't use syntactic sugaring. Especially if the language doesn't support it.

I've found that Ruby is good at 'syntactic sugaring' - in fact it's one of the best languages for it. And syntactic sugaring can make your code more readable, not make you look dumb. Example: Ruby's one-line if (exit unless "restaurant".include? "aura").
But you're right - sugar can make something sweet or over-sweet. ;)

Blizzard

Sure, syntactic sugaring can be good as you said. My main point was to avoid cryptic code after all. xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

RoseSkye

http://www.youtube.com/watch?v=b9wtNGpxP8o



:D

Video displaying new HUD by winkio
Sprites by Southerland Zero
Kill Count by winkio/ game_guy
Communication system by me ;) [If you want to just skip to the communication system goto 0:54]


Hellfire Dragon

Hey Blizz is there a way to check if a skill that has a certain element is used? ie, use some fire skill to melt a wall of ice.

Zeldaknight

Quote from: Blizzard on October 07, 2009, 04:09:33 am
Sure, syntactic sugaring can be good as you said. My main point was to avoid cryptic code after all. xD

Yeah, you're right of course.

BTW I'm re-trying to translate the script for RMVX (last time I decided it was too hard and gave up) now that I'm a little better with Ruby.
>:( I can't see why they changed RGSS2 so much - I think most of the changes will just be changing names of methods ($game_system.words.sp => $game_system.terms.mp etc. And I liked SP better anyway :P )