This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: IndieBoy on Mon 30/05/2011 20:11:33
int attack_value = Random(5) + 5; // 5 - 10
bool hit = (Random(99) < 70); // 70% chance of the hit connecting
if (hit) {
Log.AddItem("Dave attacked Behemoth.");
Log.AddItem(String.Format("Behemoth lost %d HP.", attack_value));
EnemyST -= attack_value; //< Here is were I made the small tweak but I had fix this other part in a script to get this to work.
}
else {
Log.AddItem("Attack missed.");
}
if(EnemyST -= 5){
Log.AddItem("Dave attacked Behemoth.");
Log.AddItem("Behemoth lose [?] HP.");
}
else if(EnemyST -= 0){
Log.AddItem("Attack missed .");
Log.AddItem("Behemoth lose 0 HP.");
}
// new module script
struct Random(6){
int Random[0] = EnemyST -= 5;
int Random[1] = EnemyST -= 6;
int Random[2] = EnemyST -= 7;
int Random[3] = EnemyST -= 8;
int Random[4] = EnemyST -= 9;
int Random[5] = EnemyST -= 10;
};
// RPH module header
enum RPG_timing { //RPG_timing wont high light blue?
eWait,
eActive,
};
#define DEFAULT_ATB eWait
#define DEFAULT_ATB eWait
import int MovePlayerTo(Character* characterRef, float seconds, short toX, short toY, RPG_timing timing=DEFAULT_ATB);
import int MoveEnemyTo(Object* objectRef, float seconds, short toX, short toY, RPG_timing timing=DEFAULT_ATB);
// RPG module script
function repeatedly_execute() {
My_hp.Text = String.Format("%d/1000", playerHP);//pair health
Label12.Text = String.Format("HP:%d", playerHP);//pair health
EnemyHP.Text = String.Format("HP: %d/1000", EnemyST);//Enemy health
}
function repeatedly_execute_always() {
Label12.Text = String.Format("HP:%d", playerHP);//pair health
}
int MoveEnemyTo(this Object*, float seconds, short toX, short toY, RPG_timing) {
return MoveTargetTo(this, seconds, toX, toY, timing);
}
int MovePlayerTo(this Character*, float seconds, short toX, short toY, RPG_timing) {
return MoveCharacterTo(this, seconds, toX, toY, timing);
}
How does it look so far?
![]() | ![]() |
Screenshot 1 | Screenshot 2 |
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.253 seconds with 15 queries.