Discuss all aspects related to modding Zandronum here.
-
rico345
-
- Posts: 68
- Joined: Sun Jul 08, 2012 2:13 pm
- Location: Republic Of Korea
#1
Post
by rico345 » Mon Jan 27, 2014 3:59 am
Code: Select all
//Damage Change
script 112 (int setDamage){
SetActorProperty(0,APROP_Damage,(setDamage));
}
This is the code. It works but one problem is the random number of damage.
What I want is just simple : Exactly adjusted damage what I did.
In Decorate, it's simply solved with like this : Damage (85).
How to same with ACS?
-
Hypnotoad
- Retired Staff / Community Team Member
- Posts: 528
- Joined: Tue May 29, 2012 8:50 pm
- Location: Britland
#2
Post
by Hypnotoad » Mon Jan 27, 2014 4:10 am
-
ibm5155
- Addicted to Zandronum
- Posts: 1641
- Joined: Tue Jun 05, 2012 9:32 pm
- Location: Somewhere, over the rainbow
#3
Post
by ibm5155 » Mon Jan 27, 2014 12:18 pm
setDamage=random(0,1000); ?
-
Klofkac
- Forum Regular
- Posts: 481
- Joined: Sat Jun 09, 2012 1:31 pm
- Location: Ask Grandvoid servers
#4
Post
by Klofkac » Mon Jan 27, 2014 12:34 pm
ibm5155 wrote:
setDamage=random(0,1000); ?
Subject wrote:How to no random damage with SetActorProperty?
𝕂𝕝𝕠𝕗𝕜𝕒𝕔
-
Cruduxy
- Zandrone
- Posts: 1059
- Joined: Fri Jun 08, 2012 4:24 pm
#5
Post
by Cruduxy » Sun Sep 21, 2014 12:03 pm
What are you using this code for?
Anyway Aprop_Damage represents missile damage so what you are changing is the base damage for missiles and the damage formula is still the wildely random projectile damage.
To be specific, ACS is not doing anything wrong. The Decorate actor applies the damage formula.
Maybe
http://zdoom.org/wiki/ACS_ExecuteWithResult with with a_explode with minimal radius can make it work.
Last edited by
Cruduxy on Sun Sep 21, 2014 12:10 pm, edited 1 time in total.
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]
-
Ivan
- Addicted to Zandronum
- Posts: 2229
- Joined: Mon Jun 04, 2012 5:38 pm
- Location: Omnipresent
#6
Post
by Ivan » Sun Sep 21, 2014 12:16 pm
Here's a cool trick. You can do this in the Damage property in the decroate: Damage (BASEDAMAGE + ACS_ExecuteWithResult(###)). The result of that script will be added on top of the damage. So, for example, if a damage change should occur in a condition, you can have that script check for that condition.
-
Watermelon
- Zandrone
- Posts: 1244
- Joined: Thu Jun 28, 2012 9:07 pm
- Location: Rwanda
#7
Post
by Watermelon » Sun Sep 21, 2014 3:56 pm
ibm5155 wrote:
setDamage=random(0,1000); ?
Do you read the topics before posting?
