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.

random elements spell

ok, i want to make a spell that will either be fire, water, earth or wind
but i dun't know know how to do this i'm using xp and i don't know if need a script a variable or an event
please help
if you help me i'll pay you in backrubs
 
While I don't need your backrubs, I'll try to help you out on the topic at hand...

First, event-only approach... you MIGHT be able to do a very simple link to a common event in your random spell, which stores a randomized value from 0 to n (aka 0 to 2 in your case), which is followed by a conditional such as the following (written in fake syntax):
Code:
if (Random_Variable == 0)

    cast Skill (002) # this is your fire spell

elsif (Random_Variable == 1)

    cast Skill (003) # this is your water spell

elsif (Random_Variable == 2)

    cast Skill (004) # this is your earth spell

end
As I said, this might or might not work, and I wouldn't seriously suggest it. But as I know the community, people like to take the easier-appearing solutions rather than getting a better one by trying to script it, so yeah... if this doesn't work and you can't get the scripted one done by yourself, post in Script Support/Request, and a funny fella might help ya out :)
 

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