Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: LiTTleDRAgo on October 21, 2011, 12:03:04 am

Title: [XP] Throw System
Post by: LiTTleDRAgo on October 21, 2011, 12:03:04 am
Throw System
Authors: LiTTleDRAgo
Version: 1.52
Type: Custom Environment System
Key Term: Custom Environment System



Introduction

Character can pick up and throw objects


Features




Screenshots

(http://3.bp.blogspot.com/-1iFP-jTBZBQ/UecmPmbQ77I/AAAAAAAAAPk/48d1ENu7HaU/s1600/throw_system.JPG)


Script

Here (http://littledrago.blogspot.com/2011/10/rgss-throw-system.html)


Instructions

In the script

You probably need these

image: ShowHide
(http://3.bp.blogspot.com/-OVuaOp5kMAo/UecmT8XIbxI/AAAAAAAAAPs/YeORYAWwBSo/s1600/Hero_Pick.png) (http://4.bp.blogspot.com/-97NchbzWehI/UecmUPZdfvI/AAAAAAAAAPw/Kbd4urScEqc/s1600/Hero_TRW.png)




Compatibility

Compatible with/without Blizz ABS 2.84 & 2.85
Other version is untested, but probably works


Credits and Thanks




Author's Notes

Known Issues :


~Enjoy
Title: Re: [XP] Throw System
Post by: Susanm on December 15, 2011, 12:30:01 pm
OOOOooooo.... LOVELY!!! :^_^':  Is there anyway to make the object that is thrown to land on another event and trigger it? for example: a rock is thrown at a switch and once the rock lands on the switch it opens a door? and also is there a way to make an object thrown to shatter? such as a pot thrown and it breaks once it lands?  :shy:
Title: Re: [XP] Throw System
Post by: Stray on December 25, 2011, 08:04:02 am
If this was for Blizz-ABS... it would be a dream. °-°
Throwing stones after some monsters would be very funny. :D
Title: Re: [XP] Throw System
Post by: Futendra on December 27, 2011, 07:21:50 am
IMA TEST IT NOW!

Does it hit enemies in BABS?

EDIT:
Got an undefined method error for Game_Player on line 238:

  alias pickup_check_event_trigger_there check_event_trigger_there
Title: Re: [XP] Throw System
Post by: Starrodkirby86 on December 27, 2011, 05:26:33 pm
Quote from: LiTTleDRAgo on October 21, 2011, 12:03:04 am
Compatibility

I don't think it's compatible with Blizz ABS


Certainly doesn't seem like it, especially since it's an independent hash from XAS. I mean, he'd probably be more vocal about it being compatible with Blizz-ABS if he intended it to create it for that, but it seems it's simply, as I mentioned earlier, an independent script entirely with its origins from XAS.

Anyway, nice work, Drago. :)
Title: Re: [XP] Throw System
Post by: Futendra on December 27, 2011, 07:20:54 pm
Quote from: Starrodkirby86 on December 27, 2011, 05:26:33 pm
Quote from: LiTTleDRAgo on October 21, 2011, 12:03:04 am
Compatibility

I don't think it's compatible with Blizz ABS


Certainly doesn't seem like it, especially since it's an independent hash from XAS. I mean, he'd probably be more vocal about it being compatible with Blizz-ABS if he intended it to create it for that, but it seems it's simply, as I mentioned earlier, an independent script entirely with its origins from XAS.

Anyway, nice work, Drago. :)


It's late, have some mercy over me, I read with lucifers popped in my eyes... or somethign like that.
Title: Re: [XP] Throw System
Post by: Stray on January 04, 2012, 11:35:35 am
It's a nice script. But I think it's not very useful as long as it isn't compatible with the ABS, because pick up objects and throw them away is easy to make with the maker itself. Throw stones at some monsters would be very practical. 8)
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on January 25, 2012, 12:18:50 am
updated to v0.20

Quote from: Stray on January 04, 2012, 11:35:35 am
It's a nice script. But I think it's not very useful as long as it isn't compatible with the ABS, because pick up objects and throw them away is easy to make with the maker itself. Throw stones at some monsters would be very practical. 8)


this is still prototype anyway, don't expect too much
Title: Re: [XP] Throw System
Post by: Sin86 on January 25, 2012, 08:39:10 pm
Says compatible with Blizz ABS although I can't seem to pick up the object. I set the rock event to <Throw5> somewhere in the event name and he still doesn't pick up the rock. Tried placing the script above and below Blizz ABS, still didn't fix it.
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on January 25, 2012, 09:50:11 pm
weird, I seems have no trouble like that

what other script did you use?
Title: Re: [XP] Throw System
Post by: Sin86 on January 25, 2012, 09:55:25 pm
Just Blizz ABS, I am using Blizz ABS version 2.84.

On mine, I use the confirm key(Enter), is that what button your suppose to use for picking up and throwing?
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on January 25, 2012, 11:02:28 pm
yeah, it using confirm button to pick and throw

could you upload a demo for your project?
I can't find any errors in mine
Title: Re: [XP] Throw System
Post by: Sin86 on January 25, 2012, 11:14:22 pm
I made a demo but installed Blizz ABS with all defaults on, it worked. I tried for my own game, it did not work but I fiddled around with the demo and found what caused it.


Me turning on pixel movement rate to anything thats not 0.
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on January 26, 2012, 12:59:53 am
update to 0.31

try throwing stuff to your enemies XD
Title: Re: [XP] Throw System
Post by: Sin86 on January 26, 2012, 03:24:49 am
I can pick up stuff yet after I pick it up I cannot throw it anywhere. Only way I can get an object off of me is if I goto another map but after that, I can't attack or use skills. Also, it seems to override any pixel movement rate if you have it on too.
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on January 26, 2012, 03:28:22 am
Quote from: Sin86 on January 26, 2012, 03:24:49 am
I can pick up stuff yet after I pick it up I cannot throw it anywhere. Only way I can get an object off of me is if I goto another map but after that, I can't attack or use skills. Also, it seems to override any pixel movement rate if you have it on too.


hmm when and what you did to make that error?
Title: Re: [XP] Throw System
Post by: Sin86 on January 26, 2012, 03:31:16 am
Well if I pick it up, I can pick it up however I cannot throw it once I'm holding it.

And when I go into an event that brings me into another location, although the item I'm carrying is now gone, however I cannot seem to attack or do anything else.
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on January 26, 2012, 03:36:19 am
I'll look at it after my school is done,
for now try removing striked word and add the bolded word below

-------------------removed----------------------
Title: Re: [XP] Throw System
Post by: Sin86 on January 26, 2012, 03:51:24 am
Understood.

Just did exactly as done by removing out 2 of those lines and making a new one below the 2nd scratched out line and I got this error.


Script 'Throw System' line 97: NoMethodError occurred.

undefined method `sprite_normal' for #<Game_Player0x95b3830>
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on January 26, 2012, 03:58:35 am
--"

could you upload a demo for your project?
Title: Re: [XP] Throw System
Post by: Sin86 on January 26, 2012, 04:06:02 am
http://www.sendspace.com/file/zzatfn

Link to demo with a completely default Blizz ABS on it.

However, the Throw System is exactly how you wanted the segments to be altered on your previous post.
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on January 26, 2012, 07:53:07 am
updated to 0.40, try that
Title: Re: [XP] Throw System
Post by: Sin86 on January 26, 2012, 10:11:37 am
Can still piick up but cannot throw. However this time, I can goto an event that takes me to another map without having attacks and skills being disabled.
Title: Re: [XP] Throw System
Post by: Futendra on January 26, 2012, 03:35:03 pm
I also can pick up but can't throw, maybe ask help of someone else? g_g, winkio,... ?

is this supposed to be in ""?
eval_text = "
class #{name}
if $BlizzABS
   alias update_for_throwing update_moving
   alias move_for_throwing move
else
   alias update_for_throwing update
end
alias pickup_check_event_trigger_there check_event_trigger_there
#--------------------------------------------------------------------------
# ● Check Event Pickup
#--------------------------------------------------------------------------
def player()  $game_player  end unless $BlizzABS
def check_event_trigger_there(triggers)
   throw_event(0)
   pickup_event   
   return if player.pickup_lock
   return if !player.pickup_lock_time.nil? && player.pickup_lock_time > 0
   pickup_check_event_trigger_there(triggers) 
end
#--------------------------------------------------------------------------
# ● Update Moving (BlizzABS)
#--------------------------------------------------------------------------
def update_moving(d)
   update_for_throwing(d)
   update_carry_time
   update_throw_position
end
#--------------------------------------------------------------------------
# ● Update (Non BlizzABS)
#--------------------------------------------------------------------------
def update
   update_for_throwing
   update_carry_time
   update_throw_position
end
#--------------------------------------------------------------------------
# ● Move (BlizzABS)
#--------------------------------------------------------------------------
def move(d)
   return if !player.pickup_lock_time.nil? && player.pickup_lock_time > 0 
   move_for_throwing(d)
end
#--------------------------------------------------------------------------
# ● Update Carry Time
#--------------------------------------------------------------------------
def update_carry_time
    if !player.pickup_lock_time.nil? && player.pickup_lock_time > 0
       player.pickup_lock_time -= 1
       sprite_normal if player.pickup_lock_time  == 0 ##
    end
    if !$game_temp.carry_time.nil? && $game_temp.carry_time > 0
       $game_temp.carry_time -= 1
       reset_pickup if $game_temp.carry_time == 0
    end 
  end 
#--------------------------------------------------------------------------
# ● Update Throw Position
#--------------------------------------------------------------------------
def update_throw_position
   $game_map.events.each_value {|event|
     if event.throw_active && !event.jumping?
       event.real_x = player.real_x
       event.real_y = player.real_y - 128
       event.x = player.x
       event.y = player.y
       sprite_carry
     end  }   
end
#--------------------------------------------------------------------------
# ● Throw Event
#--------------------------------------------------------------------------
def throw_event(type)
   return if !player.pickup_lock
   return if player.pickup_lock_time > 0
   return if $game_system.map_interpreter.running?
   $game_map.events.each_value {|event|
     return unless event.is_a?(Game_Event)
     if event.throw_active && !event.jumping?
       $game_temp.can_throw = true
       if type == 1
         event.throw_action(1)
       else 
         event.throw_action(event.throw)
       end
       return if !$game_temp.can_throw
       sprite_throw     
       $game_temp.throw_pos_x = event.x
       $game_temp.throw_pos_y = event.y
       player.pickup_lock_time = 15     
       event.throw_active = false
       player.pickup_lock = false         
       event.move_speed = event.pre_move_speed
       event.walk_anime = event.pre_walk_anime
     end  }   
end
#--------------------------------------------------------------------------
# ● Pickup Event
#--------------------------------------------------------------------------
def pickup_event   
   return if player.pickup_lock
   return if !player.pickup_lock_time.nil? && player.pickup_lock_time > 0   
   return if $game_system.map_interpreter.running?
   $game_map.events.each_value {|event|
     if player.front_pos?(event.x,event.y)
       return if event.throw.nil? || event.throw == 0
       return if event.erased
       return if event.through
       player.pickup_lock_time = 15
       event.throw_active = true
       player.pickup_lock = true
       sprite_throw
       event.jump(0,0)
       event.x = player.x
       event.y = player.y
       event.pre_walk_anime = event.walk_anime
       event.pre_move_speed = event.move_speed
       event.move_speed = 7
       event.walk_anime = false
     end }
   end
#--------------------------------------------------------------------------
# ● About Actor
#--------------------------------------------------------------------------
def about_actor
   @actor = {}
   @actor = {
     1 => $game_party.actors[0],
     2 => $game_party.actors[1],
     3 => $game_party.actors[2],
     4 => $game_party.actors[3],
     
     99 => $game_party.actors[99]  }
end
#--------------------------------------------------------------------------
# ● Sprite Throw
#--------------------------------------------------------------------------
def sprite_throw
   about_actor
   for i in 1..4
     name = @actor[i].character_name.to_s rescue ''
     if player.character_name == name or
        player.character_name == name + '_PICK'
       player.character_name = name + '_TRW'
     end
   end
end
#--------------------------------------------------------------------------
# ● Sprite Carry
#--------------------------------------------------------------------------
def sprite_carry
   about_actor
   for i in 1..4
     name = @actor[i].character_name.to_s rescue ''
     if player.character_name == name or
        player.character_name == name + '_TRW'
       player.character_name = name + '_PICK'   
     end
   end
end
#--------------------------------------------------------------------------
# ● Normal
#--------------------------------------------------------------------------
def sprite_normal
   about_actor
   for i in 1..4
     name = @actor[i].character_name.to_s rescue ''
     if player.character_name == name + '_PICK' or
        player.character_name == name + '_TRW'
       player.character_name = name
     end
   end
end
end"
Title: Re: [XP] Throw System
Post by: Sin86 on January 26, 2012, 06:42:56 pm
I found out why I can't throw.

I did a process looking to find what scripts were wrong, deleted them out and that wasn't what caused it. I tried removing any paraell processes, didn't work either. I came to a point to where it all comes to how many enemies and destroyable objects are on the screen as well as events that are not tagged as enemies or objects are on the screen. It kind of depends on how many enemy/object events are and also how many non-enemie/object events are on the maps.


For instance, I got 8 enemy/objects on my screen and 2 normal events and 1 rock event(rock event depicts a rock that you can pick up and throw). At that point I can pick up but not throw. However, if I remove one of the enemy/objects from the map(6 are destroyable, 2 are not, I however remove one that is destroyable), then I can throw my rock around.
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on January 26, 2012, 08:36:26 pm
updated to 0.43
Title: Re: [XP] Throw System
Post by: Sin86 on January 26, 2012, 09:20:17 pm
I don't get it. I tried working this new version on one demo with no other scripts besides this and the current Blizz ABS and it works. Yet I do it with another demo that also just uses no other scripts besides this and the current Blizz ABS and that one did not work. Both rock events have the same event names too in both demos and the confirm keys on both are also Enter as well.
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on January 26, 2012, 09:39:14 pm
forget to mention

character can't pick / throw if didn't have "_Pick" & "_TRW" graphic 
Title: Re: [XP] Throw System
Post by: Sin86 on January 26, 2012, 09:57:02 pm
Ah, that explains why the other demo character didn't pick up the rock. No message shown like in the other versions.

Sweet, I can throw rocks just about anywhere regardless of how many events/enemies/objects there are.

Thank you so much Littledrago, it really works now(and thank Moghunter too).


Oh yeah, is there also a way on how you can have it to where once you throw a rock, it crumbles and can't be used again unless you leave and re-enter the map?
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on January 26, 2012, 11:33:30 pm
update to 0.50

Spoiler: ShowHide
(http://i.imgur.com/VyXb3.jpg)


how about that?
Title: Re: [XP] Throw System
Post by: Sin86 on January 27, 2012, 12:20:16 am
Really good but now if you throw an object after it explodes, well if you leave the room and come back in a first time, the rock will disappear and the animation will play. Leave the room a 2nd time and come back in a 2nd time the rock will come back. Pick it up and throw it again, you will have to leave and come back in twice.
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on January 27, 2012, 02:07:27 am
try adding this line

Quote
  alias upd_for_throw update
  def update
    upd_for_throw
    if @throwed && @thssw && !jumping?
      $game_self_switches[[$game_map.map_id,@id,@thssw]] = true
      $game_map.need_refresh = true
      @throwed = false
    end
  end
end
Title: Re: [XP] Throw System
Post by: Sin86 on January 27, 2012, 02:14:35 am
It worked.

Once again, thank you very much.
Title: Re: [XP] Throw System
Post by: Futendra on January 28, 2012, 06:13:41 am
Can you update this so when the first block in front of the player is unpassable, you cannot throw the item?

Now when you throw it when there is an unpassable block in front of the player, it drops under the player.

Also, could you make it impossible to throw at through events? Maybe with a tag like <Unpassable>
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on January 28, 2012, 08:28:46 pm
done, update to 0.52

btw I already use <Unpassable> on another script so I change it to <BlockThrow>
Title: Re: [XP] Throw System
Post by: Futendra on January 29, 2012, 04:56:17 am
Quote from: LiTTleDRAgo on January 28, 2012, 08:28:46 pm
done, update to 0.52

btw I already use <Unpassable> on another script so I change it to <BlockThrow>


Also, I use idle sprites for Blizz-ABS and when I picked something up, the idle sprites overwrite the picked-up sprites. I need the idle sprites because of some other bug...
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on January 29, 2012, 09:56:10 am
done, updated to 0.53

try it out
Title: Re: [XP] Throw System
Post by: Boba Fett Link on January 29, 2012, 03:42:22 pm
This looks epic. It'll be perfect once you add pixel movement compatibility!
Title: Re: [XP] Throw System
Post by: 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?
Title: Re: [XP] Throw System
Post by: 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?
Title: Re: [XP] Throw System
Post by: Futendra on January 30, 2012, 12:33:14 am
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.
Title: Re: [XP] Throw System
Post by: 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
Title: Re: [XP] Throw System
Post by: Futendra on January 30, 2012, 09:53:31 am
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
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on January 30, 2012, 10:15:24 pm
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   
Title: Re: [XP] Throw System
Post by: Magus on March 27, 2012, 03:11:10 pm
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.
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on July 18, 2013, 09:16:18 am
update to work with blizz abs 2.85
Title: Re: [XP] Throw System
Post by: whitespirits on September 20, 2014, 05:58:47 am
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

Title: Re: [XP] Throw System
Post by: whitespirits on October 02, 2014, 09:56:49 am
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
Title: Re: [XP] Throw System
Post by: Josey on February 02, 2015, 10:04:07 am
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 (http://www.mediafire.com/download/vaqqwg141gzader/throw_system.rar)


Josey~
Title: Re: [XP] Throw System
Post by: Josey on February 27, 2015, 12:44:21 pm
No one? :<
Title: Re: [XP] Throw System
Post by: KK20 on February 27, 2015, 02:16:19 pm
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.
Title: Re: [XP] Throw System
Post by: LiTTleDRAgo on February 27, 2015, 02:51:05 pm
* fixed * (probably)

Nb : Untested (I didn't hold rmxp right now)
Title: Re: [XP] Throw System
Post by: Josey on February 27, 2015, 07:04:10 pm
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?
Title: Re: [XP] Throw System
Post by: Josey on September 15, 2015, 04:27:26 pm
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~
Title: Re: [XP] Throw System
Post by: Josey on October 12, 2015, 04:15:45 am
No one here? ._.
Title: Re: [XP] Throw System
Post by: Josey on January 06, 2016, 07:44:18 pm
Still searching ._.
Someone found, that has made! :D
Title: Re: [XP] Throw System
Post by: GT on March 19, 2017, 06:23:58 pm
bump. i guess


added this script and got a slight movement of a rock, no hold, run/hold, etc. Am I missing something?
Title: Re: [XP] Throw System
Post by: KK20 on March 20, 2017, 01:27:42 am
Could you be a bit more descriptive as to what you did? Pictures would be nice.
Title: Re: [XP] Throw System
Post by: GT on March 21, 2017, 12:31:16 pm
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
(http://i67.tinypic.com/21oms5e.png)


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
(http://i65.tinypic.com/25qvh2t.png)


In game shot, everything's smooth and running fine
Spoiler: ShowHide
(http://i64.tinypic.com/2wbwzeg.png)


Walk up to the boulder (Event named as <Throw4>)
Spoiler: ShowHide
(http://i68.tinypic.com/2s8qrf5.png)


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
(http://i66.tinypic.com/2diiro3.png)


Now the event does nothing, just stays stationary, action button does nothing.
Spoiler: ShowHide
(http://i67.tinypic.com/1zc3ibm.png)


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  :???:
Title: Re: [XP] Throw System
Post by: KK20 on March 21, 2017, 05:48:06 pm
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.
Title: Re: [XP] Throw System
Post by: GT on March 21, 2017, 08:29:04 pm
I thought about that too but wouldn't the action still be considered possible? Maybe changing the dash key?
I thought forsure that there was a way to active an event via button being pushed.
Title: Re: [XP] Throw System
Post by: KK20 on March 21, 2017, 09:14:18 pm
If you want to change how to trigger an event, it would be located in Game_Player at the bottom of the script. I wouldn't advise it unless you really know what you're doing.

And I think you're mistaking that for a Conditional Branch where the check is for if a button is currently being pressed. That's not the same as triggering an event to start.
Title: Re: [XP] Throw System
Post by: GT on March 21, 2017, 10:12:17 pm
It's starting to look a bit like a loss cause, even if I got the desired result it would probably bug due to the platforming script disabling Up & Down, that throwing while jumping or running.
One could dream I guess
Title: Re: [XP] Throw System
Post by: KK20 on March 21, 2017, 10:35:21 pm
Well that is what I told you from the start. You're better off making it yourself from scratch than trying to repurpose this one to work.
Title: Re: [XP] Throw System
Post by: GT on March 22, 2017, 12:46:41 am
over and out