Author Topic: Boomerrang Idea  (Read 5207 times)

jweldon

  • Visitor
  • *
  • Posts: 16
    • View Profile
    • Email
Boomerrang Idea
« on: 2005-12-28, 11:16:34 PM »
I'm having trouble with a weapon (Boomerrang).  I can create the sprite when a press a button and it appears quickly and then disappears right after I throw it.  At first I tried to create in within the map editor & special functions.  Then I used the scripting wizard because it was not acting like my two other weapons(fireballs and rocks).  Could the settings I did before the scripting wizard affect the scripting wizard?  I tried to change the boomerrang even so that it would just act like my fireballs (follow nearest enemy) to see if it would work that way but it still just appeared and disappeared like before.  Here are my Boomerrang Sprite settings and special function settings and a brief explanation of what I did with the scripting wizard.

BOOMERRANG SPRITE: (These are identical to my other weapons except they are single state, I wanted to animate the boomerrang)
360/10*
Controled by: Path Vector
Movement/Jump height = 3
Inertia = 100
Auto delete = 6.3 or Hit Solid

SPECIAL FUNCTION: Throw Boomerrang
Actions: Intinal press, button 3, global
Effects: Create Sprite, Relative to player = (32,32)
Maximun Count = 1

SCRIPTING WIZARD DESCRIPTION:
Button 3 (Boomerrang)
Instatnce of Boomerrang
Uses Item of (None) (because I don't want it to disappear from my inventory)
Max Instance of = 5
In direction of player sprite

If you need more data I guess I can zip the game to anyone.... As long as you don't laugh at it.  This is my first game and I am experimenting with SGDK to see the capabilities.  The graphics are bad, especially on the first level.

Thanks ahead for any ideas or advice.

John

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Boomerrang Idea
« Reply #1 on: 2005-12-29, 09:11:18 AM »
1. I don't think you want it to be a 360/10

jweldon

  • Visitor
  • *
  • Posts: 16
    • View Profile
    • Email
Re: Boomerrang Idea
« Reply #2 on: 2005-12-29, 07:55:45 PM »
Thanks for the ideas I will try them and get back to you.  The path for the sprite is only one point and that's probably whats wrong.  It is a top view RPG type game and I was hoping to have the boomerrang go and hit an enemy and then return to me after the hit.  I had to put it at 32,32 of my player to keep it from disappearing as soon as I threw it.  (One of my collisions is that the boomerang disappears when it touches the player sprite.)  I may lose this feature it sounds like it may not work like I thought.

Thanks,
John

cbass

  • Expert
  • Regular
  • *****
  • Posts: 97
  • script this
    • View Profile
    • Squest RPG
Re: Boomerrang Idea
« Reply #3 on: 2005-12-29, 10:21:35 PM »
to avoid the instant dissappear and solve some other problems, couldn't you just do this:

Create 2 different sprite defs/templates.

Make the first boomerang a simple shot created with the scripting wizard (shoots off straight in one directions, and deleted at end of path.)  Except "at end of path", or through script on a sprite collision, make a new sprite.

The second sprite can be simple as well.  Make it have no solidity,follow the player sprite.  And have it removed in a collision with the player sprite.

Each sprite must have its own collision class (shot-boomerrang, and returning boomerrang)

You can also make it pretty easy to have one on the screen at a time, make the function that shoots it require an inventory and remove it, and the final collision with the playersprite add the inventory back.  Be sure to get that inventory either at the beginning or when you pick the boomerang up.

jweldon

  • Visitor
  • *
  • Posts: 16
    • View Profile
    • Email
Re: Boomerrang Idea
« Reply #4 on: 2005-12-29, 10:29:25 PM »
Oh Yeh!!

jweldon

  • Visitor
  • *
  • Posts: 16
    • View Profile
    • Email
Re: Boomerrang Idea
« Reply #5 on: 2005-12-29, 11:10:02 PM »
OK all is well in the game now, Thanks for the help Cbass.

Later,

I'm sure I'll be back sometime...

Scarecrow(sXs)

  • Visitor
  • *
  • Posts: 9
    • View Profile
Re: Boomerrang Idea
« Reply #6 on: 2007-04-24, 05:43:37 PM »
Instead of that, simply make the character shoot the boomerang using GameDev Script. Make the Sprites defenition "Move towards Player Sprite" and set its speed at 10, and like 70 Inertia. Also have a Collision of where the Boomerange contacts with Player Sprite(Delete)

This way the Boomerange will be shot out for a distance, and like a tracking missile come right back and delete itself.

You could set a max instance of 1 so he wouldn't have multiple boomerangs.