Jump to content

Circle Referens? Is it possible


Metalzed

Recommended Posts

Hi.

 

I have a game with a charakter with Stats.

eg.

Strength

Physics

Agility

Attack

Defend

Sword

Shield

 

 

The game should then calculate a bonus Value Based on the Stats.

 

(Strengh Value + Physics Value)/2= AttackBonus.

AttackValue * AttackBonus = Final_AttackValue

 

 

I have two Tables

Stats (This have all the values of the char)

StatID (The Key)

Value (The Value)

BonusID (What Bonus that )

 

BonusMath (This have how to calculate)

BonusID (The Key)

StatID (What Stat to use)

Multiple (What to multiple With. eg Strengh * 0,5)

 

I want to create a View that Calculate the Bonus for the Stats.

I created a View called StatswithBonus that counts the Bonus and add it to the stats.

This part works

 

 

Now comes the problem.

 

I want to add bonus to the Sword Stat.

eg (Attack + Agility)/2= SwordBonus.

Sword* SwordBonus = Final_SwordValue

 

 

The View will only count the base AttackValue, Not with The Bonus.

 

If I use the Final_AttackValue I will get a Circle References Right?

 

 

My Question is.

Can I use one value in a view to generate a other value in the same view?

Link to comment
https://forums.phpfreaks.com/topic/213756-circle-referens-is-it-possible/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.