Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Item Equipable Weapons

I have a Question.... How would I code Item Equiptable Weapons? but how would I.... begin to code it.... Is it possible to have defs within defs or something? Just wondering how I could do this by myself....


If this script has already been made.... Please help me find it....
 
I thought I was being clear.... You see, I want to have like a Magic Wand with a hole for an Orb to fit.... If I were to put a certain orb in it, it would gain a certain power.... I want this sort of system.... for example Weapon 1 can have equiptable items.... And the items that that can be put into the Orb slots are:

[5,2,91,45, etc] So is this possible?
 
sasuke89;110288 said:
I thought I was being clear.... You see, I want to have like a Magic Wand with a hole for an Orb to fit.... If I were to put a certain orb in it, it would gain a certain power.... I want this sort of system.... for example Weapon 1 can have equiptable items.... And the items that that can be put into the Orb slots are:

[5,2,91,45, etc] So is this possible?

Personally if I was doing this I'd add a variable (slots, integer type) to the weapons and then another variable to game_actor (orbs, array type) and then build a window and scene to add and remove orbs and then script in their powers.
 
Like

Code:
$data_weapons[id].items = []
  for i in 0..$data_items.size
    $data_weapons[id].items = [i]
  end
$data_weapons[5].items[45,63,42]

And in the Scene I add:

Code:
for i in 0..$data_weapons.size
  if $data_weapons[i].items.exist?
    for z in 0..$data_items.size
      $data_items = $data_weapons[i].items
    end
  end
  showitems
end
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top