Scipted substitute for targeting and damage formula needed.

varchild4

Veteran
Veteran
Joined
Nov 13, 2015
Messages
30
Reaction score
3
First Language
Francais
Primarily Uses
I stopped developping this game for one year so i have to make a new post now that i have time to continue. You can see the original post there but I will resume some interventions here too. 





Using Hime's "Tag Manager" makes this Big bird's ability to damage only "insects" but doesn't prevent it from attaking itself (even if it do zero damage.)

Andar said: 


you'll either need to abandoning the attack pattern and use a scripted substitute for targeting, or you'll have to think a bit "out of the box". (using troop events and an "allies alive" switch).


So i would like a targeting script. It will be useful for other battles dynamics too.


MeowFace said:
instead of stopping it to target self, why not add a damage formula in your skill to check if target is self, do heal instead of damage?


eg


if attacker's id = target's id, heal 100 hp and play animation 40, else play animation 1 and do 500 damage.


b.id == a.id ? a.hp += 100; a.animation_id = 40; 0 : b.animation_id = 1; 500


If you leave the animation blank in the default skill setting, you can easily set the damage formula to play 2 types of animations based on conditions. 

Probleme i encounter with MeowFace's damage formula: error message: (unexpected ';' expecting ':')


Is the formula too long to place in one line or is there an error?


If i use this formula instead: b.id == a.id ? a.hp += 100 : 500


There is no error message but.. the BigBird does zero damage to its allies and to itself. I even tried with 9999 damage in formula.. stil zero damage when testing. 





Thanks for your precious help!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
That's because it's not a correctly formatted formula for a single line.

Code:
b.id == a.id ? (a.hp += 100; a.animation_id = 40; 0) : (b.animation_id = 1; 500)


However, if the enemy is attacking the characters, b.id could be a.id and he will heal rather than attack.  I think the comparison you need to use is b == a, not b.id == a.id - you want to check if he's attacking himself, not some battler with the same id as his own (which could be one of your party members)
 

varchild4

Veteran
Veteran
Joined
Nov 13, 2015
Messages
30
Reaction score
3
First Language
Francais
Primarily Uses
You are right for b == a! It is the correct form. Also, your equation do not encounter any errors :)

Only probleme: When attacking itself, it does not heal 100 hp. Il only trigers the heal animation and does 0 damage. 
 
Last edited by a moderator:

varchild4

Veteran
Veteran
Joined
Nov 13, 2015
Messages
30
Reaction score
3
First Language
Francais
Primarily Uses
How can i change your formula so it really heals 100hp?


Right now it heals 0:

Code:
a.hp += 100
 

varchild4

Veteran
Veteran
Joined
Nov 13, 2015
Messages
30
Reaction score
3
First Language
Francais
Primarily Uses
Sorry! In in reallity, it was healing, but without specifiing it. So that the player has no way to figure out that it heals. I can put the damage type to "absorb HP" so that it does 0 to itself and vampirize it's allies. 

But is it possible to change:

Code:
b.id == a.id ? (a.hp += 100; a.animation_id = 40; 0) : (b.animation_id = 1; 500)
for something like:


b.id == a.id ? (a.animation_id = 40; +=100) : (b.animation_id = 1; 500)


so that the HP it heals are properly showed to the player? I tested the seccond formula and it crashes the game, but is there an other way to express it correctly?
 
Last edited by a moderator:

varchild4

Veteran
Veteran
Joined
Nov 13, 2015
Messages
30
Reaction score
3
First Language
Francais
Primarily Uses
I will try to ask the question elswhere cause it seems i'll get no more feedback here..


But i will keep checking out from time to time if i get feedback here. So don't refrain yourself from interracting again in this post.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,017,004
Members
137,562
Latest member
tamedeathman
Top