[XP] Throw System

Started by LiTTleDRAgo, October 21, 2011, 12:03:04 am

Previous topic - Next topic

Futendra

Quote from: LiTTleDRAgo on January 29, 2012, 10:02:09 pm
Quote from: Futendra on January 29, 2012, 03:48:34 pm
Quote from: Boba Fett Link on January 29, 2012, 03:42:22 pm
This looks epic. It'll be perfect once you add pixel movement compatibility!


Agreed!

Also, now the "idle" when something is picked up keeps walking!

+ The rocks don't hit enemies?


I can't understand your statement perfectly

is this what you mean?
- when player picked something up, his sprite keeps walking (like step animation is activated)?
- the rocks didn't do anything when hit an enemy?
Yes, that is what I mean.

LiTTleDRAgo

1. I didn't have any problem like that, but I'll look at it tomorrow
2. Do you include <AtkPower*> in the event name?

if yes try using number greater than 100 / 600

Futendra

Quote from: LiTTleDRAgo on January 30, 2012, 08:58:55 am
1. I didn't have any problem like that, but I'll look at it tomorrow
2. Do you include <AtkPower*> in the event name?

if yes try using number greater than 100 / 600


My rocks are meant to be weak... they need 50 atk power

LiTTleDRAgo

update to 0.54,

step anime probably fixed

the damage is depending on your enemy pdef
if you using a number lower than your enemy pdef then it won't do any damage

if you want static damages, add that bolded line

Spoiler: ShowHide
Quote
def throw_event?(x_plus, y_plus,p ) 
    dir = $game_player.direction
    terrain_disable = $game_map.terrain_tag(@x + x_plus, @y + y_plus)
  #    return false
    new_x = @x + (dir == 6 ? 1 : dir == 4 ? -1 : 0)
    new_y = @y + (dir == 2 ? 1 : dir == 8 ? -1 : 0)
    terrain_disable2 = $game_map.terrain_tag(new_x,new_y)
  #    return false
    v = 1
    org_x = @x + x_plus
    org_y = @y + y_plus
    p.times do   
    new_x2 = org_x + (dir == 6 ? -v : dir == 4 ? + v : 0)
    new_y2 = org_y + (dir == 2 ? -v : dir == 8 ? + v : 0)
    terrain_disable3 = $game_map.terrain_tag(new_x2,new_y2) 
  #    return false
    $game_map.events.each_value {|event|
      if event.x == new_x2 && event.y == new_y2 
         if event.name =~ /<BlockThrow>/i && !event.through
           return false
         end 
         if $BlizzABS && !event.through && event.is_a?(Map_Enemy)
           event.animation_id     = 4 if @animethrow
           if @atkpow
             atk = [@atkpow - event.battler.pdef / 2, 0].max
             atk = @atkpow
             event.battler.hp      -= atk         
             event.battler.hpdamage = atk
             $BlizzABS.util.request_damage_sprite(event) if atk > 0
             $BlizzABS.util.request_damage_sprite(event,'0') if atk <= 0
           end
           return false
         end 
      end  }   
    v += 1
    end
    return true
end   

Magus

Well, Winkio's incorporating a throw system anyway, :/ So I'm placing my bets on him....
I'm too deep of a BABS user to switch to Xas XD.
LEVEL ME DOWN. THE ANTI-BLIZZ GROUP IS AMONG YOU... Do it for the chick below...She watches..<br />

LiTTleDRAgo

update to work with blizz abs 2.85

whitespirits

Hi guys so im really interested in using this but its just not working, i added <Throw3> to the event name and when i press enter on it nothing happens :( Im using rmx-os  and blizz abs latest


whitespirits

Love the system, i would like to ask if some 1 could make it global and rmx-os ready so the items save in a place also? thanks

Josey

Hey :3

I get an error, even though I did everything as it says in the description.

Line 197
undefined method 'name' for #<Game_Event:  variable number  >

What did I do wrong?
Demo


Josey~

Josey


KK20

After getting the error message to pop up, open up your scripts and the cursor will be on the line where the error occurred. Change it to this

           if event.character_name =~ /<BlockThrow>/i && !event.through

I'm kind of surprised this went unnoticed for a long time.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

LiTTleDRAgo

* fixed * (probably)

Nb : Untested (I didn't hold rmxp right now)

Josey

Many Thanks! :D
It works! :3


Why did not anyone had this error before?
And would it look as if the rock is rolling across the floor, instead of flying? Is it that intentional?

Josey

September 15, 2015, 04:27:26 pm #53 Last Edit: January 06, 2016, 07:45:45 pm by Josey
Hi! :3

I have another request. :D
Is it possible to add some features to the script?

- if the player changes the map, he should still carrying the event/item (maybe, I need a script-command "throws event 1")
-> an free event on the destination map could change its graphic to the item the player is holding (via $game_variables) and the event is placed on the players head (the player should change his graphic too)

- throwing/removing the event by using a script command
-> idea: the player collects some items and puts them (by press another button) in his inventory, the event becomes invisible, but the player still in carry-position (and the event is still over his head)


I hope someone can help me!
I would be very grateful :)

Josey~

Josey


Josey

January 06, 2016, 07:44:18 pm #55 Last Edit: April 15, 2016, 06:38:46 am by Josey
Still searching ._.
Someone found, that has made! :D

GT

bump. i guess


added this script and got a slight movement of a rock, no hold, run/hold, etc. Am I missing something?

KK20

Could you be a bit more descriptive as to what you did? Pictures would be nice.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

GT

March 21, 2017, 12:31:16 pm #58 Last Edit: March 21, 2017, 12:52:14 pm by GT
My Bad,

I have been familiar with XP (most preferred of the makers) for a couple years but scripting has always been a foreign concept, I have a basic knowledge but still need a lot of help cause I don't really know what I'm doing half the time with it  :facepalm: *I make sprites lol*

little background for system,
-making a platformer styled game (Mario/Mario 2 *if I can get the throw right)
-Using G@meF@ce platform/gravity scripts (enemy ref/springs/etc)
-Custom HUD, but not important atm
-Other known bugs but will get to around fixing (primarily gravity on moving platforms/enemy gravity/movement on the same grounds)

I am using a couple other scripts due to gameplay but am unsure if any are conflicting
(maybe even disable the up and down carrying code but would have no idea where to start)

added the script above Main, with my others
Spoiler: ShowHide


Imported the graphics necessary (Didn't work so tried readding them with exact names in script still no result in changing of the graphic)
Spoiler: ShowHide


In game shot, everything's smooth and running fine
Spoiler: ShowHide


Walk up to the boulder (Event named as <Throw4>)
Spoiler: ShowHide


Using the action button (needs to also be changed due to his run/dash is the same button) The rock/evert does move but it flies right over him, even if I change <ThrowX> to <Throw1000>
Spoiler: ShowHide


Now the event does nothing, just stays stationary, action button does nothing.
Spoiler: ShowHide


I can upload a demo if necessary and willing to accept any help.

Thanks.



edit: I did add it to a new game just to test it and it DOES work, I am going to play around with he actual button command but it may be conflicting scripts?***
I tried looking through the throw script for a Input setting but cannot find it, maybe if it's set to to the c on the keyboard but I don't have a clue how to edit it  :???:

KK20

Since it seems to just be an event that does something special (i.e. pick up and throw), I'm going to assume that it is the confirm button (C, Space, Enter, etc.) that picks up the event since this is how you normally trigger an event. That is default RMXP behavior--there is no setting in the script to change it.

My guess with the odd movement of the boulder is due to the platformer script you're using. It's most likely incompatible as this script was written for default RMXP movement and not pixel-based platformers.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!