RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Help with random Skill casting.

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 83
Suguni raku ni shite aru
Greetings.

I'm working on a skill that lets the caster cast almost any skill featured in game. But, I can't figure how could I catch any Skill ID and compare it to a SkillID variable I'm using to decide which skill to use. And then, if the skill is cast, how could I cast it to an specific target? It may be random since I don't choose a target when casting the main skill, but, for other skills, how could this work?

I'm working on this using event handling. I looked at the scripts, but I couldn't find a function that lets me pass as arguments an specific Skill ID and a Target ID, and thus, since I'm still green at scripting, I'm asking for some help.

Thanks in advance.
"Un dios no hace nada, no dice nada, nisiquiera te pide nada a cambio. Solo se sienta y ve por nosotros, los tontos humanos perdidos."

**
Rep:
Level 75
RMRK Junior
I think knowing what battle system you are using can help here...

**
Rep: +0/-0Level 83
Suguni raku ni shite aru
Nope. Actually it's not an specific battle system. I'm just assembling a skill that lets the caster cast a random skill. It may work on almost any battle system.
"Un dios no hace nada, no dice nada, nisiquiera te pide nada a cambio. Solo se sienta y ve por nosotros, los tontos humanos perdidos."

***
Rep:
Level 87
Embrace the stillness of eternity.
For skill IDs, just pick a skill for each number. 1 will always cast fire, 2 will always cast ice, etc. Then set the variable in the skill's common event and check if the actor knows the corresponding skill. If not, re-pick the variable.

For targeting, make the skill target one enemy without doing any damage or anything. Then, if the skill is a single target skill, use the last target option in the force action box.

That's the best way I can think of to do it without scripts. Also, this is all assuming you're using XP. I'm not very familiar with the other RMs.

**
Rep: +0/-0Level 83
Suguni raku ni shite aru
I already tried that optipon, Mjustin. This one I'm trying to do basically might take almost any skill featured in game. The thing is... Using the Force Action option makes a skill always target the same group of battlers, actors or foes. Yet I need to determine which battler (actor or foe) cast the skill then apply the needed action. I guess it might not work via event handling. I even did a skill using your suggestions, even before this post, but when I ask an enemy to cast it, it gets damaged by its own action  :-\. Guess it may be solved creating two common events, one for actors, other for foes. But still there's the problem of assigning the skill to be cast. It may take about 110 commands for each action, for each common event, and that's basically what I want to avoid.รง

Hope my question had got more clear now. Anyway, thanks for your help. If you know some scripting, may you tell me which function I might use for a script?
"Un dios no hace nada, no dice nada, nisiquiera te pide nada a cambio. Solo se sienta y ve por nosotros, los tontos humanos perdidos."

***
Rep:
Level 87
Embrace the stillness of eternity.
Yeah, you'd need to make a separate skill for each group. Or, if you make the target random, just make the skill inflict a 0 priority state on the caster so it can check who used the skill. Either way it would mean a lot of conditions. Otherwise I think you'd need scripting. Unfortunately I'm not familiar with scripting so I can't help you there.

**
Rep: +0/-0Level 83
Suguni raku ni shite aru
Received that. Well, let's see what can I do about that. Hope I come with a solution. It might be a great event system to the forum. Thanks anyway.
"Un dios no hace nada, no dice nada, nisiquiera te pide nada a cambio. Solo se sienta y ve por nosotros, los tontos humanos perdidos."