[XP] Blizz-ABS

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

Previous topic - Next topic

Morality

The variables are working fine, I can't see anything wrong with them.

Blizzard

Then add this line just before the line with the gradient drawing call
p [@en, @maxen].inspect

and tell me what you get in the window.
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.

Morality


Blizzard

September 04, 2008, 07:08:26 pm #743 Last Edit: September 04, 2008, 07:12:07 pm by Blizzard
Then the drawing should make a bar that is filled up to 100% if you use "rate = @en.to_f / @maxen" and then just "rate" in the gradient bar call. :uhm:

EDIT: I just tried it and I have no problems with it. O_o Can you give me a screenshot of your problem? (Press PrintScreen during the game, open Paint and paste the image into it, then upload it on imageshack.us and post the image link you get here in spoilers).
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.

Morality

September 04, 2008, 07:40:27 pm #744 Last Edit: September 04, 2008, 07:43:14 pm by Morality
Ok, here is the screenie:
CLICK ME!

I have another question, or questions rather, but how would I go about disabling sprint/jump/sneak through a script call in an event. I need it so that if the Stamina(SP) is too low that the player cannot perform those actions. Thanks for your help thus far, Blizz, I appreciate it.

Aqua

*cough*

From the Manual: ShowHide
3.2.8. Blizz-ABS Controls Manipulation
If you need to disable Blizz-ABS controls during the game for some special occasions, you can call an event Call Script command and use following syntax to change this value even during the game:
$game_system.blizzabs = POSSIBLE_VALUE

POSSIBLE_VALUE is either true, false or nil. This command will completely override Disable ABS. If you set it to true, Blizz-ABS controls will be available whatever occasion might be (i.e. during the execution of an event). If you set this option to false Blizz-ABS controls will be disabled whatever occasion might be (i.e. a map full of enemies). If you set it to nil, the Blizz-ABS itself will take over the availability of the controls again. This option is initially nil. You can also disable only specific buttons. Use an event Call Script command and use following syntax to change the availability of one of the buttons during the game:
$game_system.attack_button = POSSIBLE_VALUE
$game_system.defend_button = POSSIBLE_VALUE
$game_system.skill_button = POSSIBLE_VALUE
$game_system.item_button = POSSIBLE_VALUE
$game_system.select_button = POSSIBLE_VALUE
$game_system.hud_button = POSSIBLE_VALUE
$game_system.hotkey_button = POSSIBLE_VALUE
$game_system.minimap_button = POSSIBLE_VALUE
$game_system.turn_button = POSSIBLE_VALUE
$game_system.running_button = POSSIBLE_VALUE
$game_system.sneaking_button = POSSIBLE_VALUE
$game_system.jumping_button = POSSIBLE_VALUE

POSSIBLE_VALUE is either true or false. If you don't use running, sneaking or jumping, it is recommended that you don't ever turn those buttons on. If the skill and/or item button is disabled and the Direct Hotkeys option is being used, skills and/or items will not be activated when pressing a number key.

Blizzard

If I see right, the color of the bar extra is slightly different... Try adding a "return" right at the start of your method and look if something else draws a bar. You might have another script part messing with yours.

If you still can't make it work, make a short demo, upload it on sendspace and post the download link here, I'll fix the problem.
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.

Morality

Where do I put 'return'?

Blizzard

Right under "def whatever".
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.

Morality

That got rid off the bar and left the white background.  :O.o:

Blizzard

I know. And that extra piece of bar that's going out of the white bar rectangle is gone as well? Alright, can you make a short demo? Upload it on sendspace.com and post a download link here, I'll try to find the problem.
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.

Morality

Here is a demo for you:
CLICKY

Talking to the soldiers near the fire will delete HP, stamina, energy, etc. and one guy gives you energy, and another gives items. Standard test map.

Blizzard

September 05, 2008, 04:38:41 pm #752 Last Edit: September 05, 2008, 04:39:39 pm by Blizzard
As I thought, it's your event. -_- It doesn't update before the script draws the bar. Just add "@en = @maxen if @en > @maxen" right under "def draw_en". -_- And next time please a SMALL demo.

It also seems that you haven't read this topic yet: http://forum.chaos-project.com/index.php?topic=23.0
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.

Morality

September 05, 2008, 04:54:28 pm #753 Last Edit: September 05, 2008, 04:55:46 pm by Morality
Ok, now for some reason the bar is fixed but the value doesn't return to 100.

Blizzard

Err, my bad. Put it under the first line in the method.
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.

Morality

September 05, 2008, 05:32:11 pm #755 Last Edit: September 05, 2008, 05:34:31 pm by Morality
  def draw_en
    # set current variables
    @en = 100 if @en > @maxen


This gives me a method '>' error.

Edit: When I enter and exit a menu it goes back too 100.

Blizzard

September 05, 2008, 05:37:59 pm #756 Last Edit: September 05, 2008, 05:39:03 pm by Blizzard
1. Not
@en = 100 if @en > @maxen

but
@en = @maxen if @en > @maxen


2. Under the first line in the method, the first line being:

@en, @maxen = $game_variables[1], $game_variables[2]

which results in
@en, @maxen = $game_variables[1], $game_variables[2]
@en = @maxen if @en > @maxen


3. http://forum.chaos-project.com/index.php?topic=23.0
Your scripts are not in an order that is considered safe.
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.

Morality

September 05, 2008, 06:09:53 pm #757 Last Edit: September 05, 2008, 06:10:36 pm by Morality
That is exactly what I have. :huh:

Blizzard

Actually your scripts are not in the right order because I saw tons of scripts that are not mine below Blizz-ABS.
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.

Morality

Talking about that line in Sprite_HUD. And it doesn't really matter anymore because I removed the text, which was what was fucked up. So thanks for your help, I fixed the script order and stuff too.