View previous topic :: View next topic |
Author |
Message |
lethal255 Don't just complain, do something about it

Joined: 11 Nov 2003 Posts: 76 Location: Right behind you
|
Posted: Mon Jul 26, 2004 8:41 am Post subject: Hack'n Slash problems |
|
|
Ok, for the past few days i've made a lot of progress on a game that uses the sword attack script from James. How ever, in an attempt to add damage math, I've hit a bit off a snag. the math formual for damage isn't working. A text varifing condtions being met are comes up, but it says no damage was dealt. All my stats have been predefined to global variables.
can some please help me!!
heres the part of my scripts the isn't working:
Code: | if (NPC at spot(NPC X(0),NPC Y(0),1)) then (((monster1 HP)-- ((hero1 Strength)--(Monster1 defence))) and (kill monster)) |
perticualy the mat part doesn't work right _________________ "what everyone went around calling you white stormy?"
"you mean, there's...a ...black stormy?"
"No" |
|
Back to top |
|
 |
*Worthy* Critical Thinker

Joined: 11 Aug 2003 Posts: 186
|
Posted: Mon Jul 26, 2004 9:53 am Post subject: |
|
|
The math part doesn't work because it's not doing anything.
I don't understand why you have so many () to be honest. But, you need to set a global variable. For example:
decrement (monster1HP,hero1strength--monster1defence)
That will decrease the monster's health. The way you have it, you just have numbers minus more numbers to give a value, but you don't do anything with the value. You have to decrease monster1hp (you just subtract a number from monster1hp but don't set monster1hp to that new value).
I hope that helps,
~Worthy _________________ You can do whatever you want...but prison is full of people who make bad decisions. |
|
Back to top |
|
 |
lethal255 Don't just complain, do something about it

Joined: 11 Nov 2003 Posts: 76 Location: Right behind you
|
Posted: Mon Jul 26, 2004 11:43 am Post subject: |
|
|
Thanks a lot man. That would probably explain why i've had so many problems with plotscrip[t equations. _________________ "what everyone went around calling you white stormy?"
"you mean, there's...a ...black stormy?"
"No" |
|
Back to top |
|
 |
|