Help with setting up a Action Set. [solved]

Started by Icey, Thu 19/07/2012 18:00:18

Previous topic - Next topic

Icey



So my RPG in order for the AI to attack or use commands during a battle they must be presetted before hand. The AI starts out with 1 command or action that they can use during battles. However as they gain levels, they get these things called ability obrs. These unlock a new command available for use in battles. You can get up to 3 ability orbs. And then if I click, all the way back to cure to start the rotation all over.

The only thing is I having a problem with is getting the AT customization set up. I'm trying to figure out a way to have it where when you click cure(the first action under summon) it should change to Cura but only if abilityorb_1 is visible. And the same thing should apply if you click it again but only it should change to Curaga if you have two orbs than Eurus if you have 3.

I can't figure out how I should script that cause I really don't want to have a bunch of If and else that don't work right. I just need some type of example that will allow me to change the normal graphic to another sprite like 5 or 72.

I'm sorry if the question is not to clear. I'm in a rush for work and I really need this answered badly. :\

Khris

First of all, it's assault; a, then u.

Now, the easiest way to do this is by using sprite slots that are in the same order as the summons.
Let's assume that the Cure image is in slot 123, Cura is in slot 124, Curaga in slot 125, etc.
Code: ags
  Button*b = ASetMenu.Controls[2].AsButton;
  b.NormalImage = player.GetOrbs() + 123;

Assuming there's an extender function int Character.GetOrbs() that returns the number of ability orbs.

(You can assign free slot numbers to existing sprites.)

Is that what you're asking?

Icey

#2
I know, I just haven't added in the fixed sprite just like Piro which should be Pyro.

Well the thing is I have nothing set up besides sprites and a idea on what I want. So what I was thinking is that when I was planning to script it without help, I could have it where if I pressed it, it would check the sprite slot then if it matches, it would check the visiblity of the matching orb. If it turns out that it is visible then it would select it however if otherwise then it would skip and rotate to the main action which would be cure for Ghost Cat.
Code: AGS

if (Button53.NormalImage == 160){
if (abilityorb_1.visible == true){
Button53.NormalImage = 166;
}
}
else if (Button53.NormalImage == 166){
if (abilityorb_2.visible == true){
Button53.NormalImage = 167;
}
}
else if (Button53.NormalImage == 167){
if (abilityorb_3.visible == true){
Button53.NormalImage = 164;
}
}
else if (Button53.NormalImage == 164){
Button53.NormalImage = 160;
}



Wait, wont that work!?! I should try it but maybe you have a simpler way of doing this.

Khris

You did see the code I posted, right?

I'm wondering, these ability orbs, are they gained permanently? As in, throughout the game, I occasionally get another one, until I have three? In other words, the cure summon slowly gets stronger?
Or are they somehow charged and I start out battles only being able to summon Cure until I charge orbs during the battle?

Icey

I seen the code, I just thought that since I gave a better description of what I'm after, the code would have changed.

Each summons gains levels separately. A summon will start out with only 1 command like fire or wind. However once they reach a certain level they will gain 1 ability orb. This will allow them to use a more stronger magic ability. Some summons can gain up to 3 orbs whilst some can only get 2.

Khris

You didn't really give a better description of what you're after. Don't try to explain it using "programmer talk", do it using "designer talk", ok? That way we'll waste much less time. Imagine you don't have the first idea about actually programming stuff, and just tell us what is supposed to happen in the game.

Now, since I'm still unsure of the gameplay mechanic you're trying to implement, let me use a concrete example:
In Chrono Trigger, characters would unlock more powerful spells once they reached a certain level. Chrono first gains Cyclone, and once he's far into the game, the last tech he gains is Luminaire. It's really powerful, but once he gets it, he can use it right at the start of a battle, provided he has enough MP.
In Chrono Cross, people unlock their more powerful spells during the battles, by landing physical attacks. They still can only user powerful attacks later in the game, but even then, they have to up their magic lvl first every time they enter a battle.
Both games also allowed still using the weaker spells, since they consume less MP/require less preceding attacks.

Now, if I understand you correctly, the player finds or gets ability orbs and thus unlocks more powerful magic abilities. But once those are unlocked, they remain unlocked. So there's really no need for a) displaying the number of orbs on the GUI b) special code that unlocks stuff. All it takes is to unlock all lvl 2 spells once the player finds the first orb, then unlock all lvl3 spells once they find the next one, etc.

Icey

#6


It may seem like it goes right to left but the arrows refer to the level connected to the last orb.


QuoteYou didn't really give a better description of what you're after. Don't try to explain it using "programmer talk", do it using "designer talk", ok? That way we'll waste much less time. Imagine you don't have the first idea about actually programming stuff, and just tell us what is supposed to happen in the game.

Ok, I'll keep that in mind ;)

SMF spam blocked by CleanTalk