HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Multishot Spellmap VI

07-10-2005, 07:43 PM#1
Setreal
For multishot I'd like the amount of targets to change each level. It normally has 7 every time.

Code:
constant function MultiShot_MaximumTargets takes integer l returns integer
    return 5+2*l //// The Maximum number of Targets
endfunction

I was thinking more like 1+1*level ( so lvl 1 is 2 , lvl 2 is 3 ect) but couldn't get it to work. I tried the below example but that just gave errors ( I'm not exactly the best at JASS :\ ).

Code:
constant function MultiShot_MaximumTargets takes real level returns real
    return 1+1*level //// The Maximum number of Targets
endfunction

Any ideas?
07-10-2005, 11:08 PM#2
Vexorian
The only explanation would be that you pasted the function thus creating a new one instead of just modiffying it, cause the contents of the code you pasted don't seem to have any problem at all
07-11-2005, 02:08 AM#3
Setreal
Yeah I did paste :\. Is there anyway around what I did to fix it? I tried deleting the trigger and taking in a new version from the spellmap and then editing it with the same compile errors. Also tried editing it from within the spellmap and then bringing it to my map with the same issue.
07-11-2005, 03:37 PM#4
Vexorian
I don't think you understood what I said, I was talking about the config function not about the whole trigger
07-11-2005, 07:26 PM#5
vile
vex i have the same problem i cant set the level. it doesnt say level, it just says the formula.. i dont see anything defined by level there :/
07-11-2005, 11:29 PM#6
Vexorian
I figured out the damn thing.

First Setreal, why the heck did you change the return value to real?

IT was fine
Code:
constant function MultiShot_MaximumTargets takes integer l returns integer
    return 5+2*l //// The Maximum number of Targets
endfunction

l (An "El" letter is an integer that determines the level.

so

Code:
constant function MultiShot_MaximumTargets takes integer l returns integer
    return 1+1*l //// The Maximum number of Targets
endfunction

Was the way to do so, without doing lame things like changing return values of functions.

Vile it is that l argument, that's the level
07-12-2005, 12:59 PM#7
vile
ahhhhhhhhhhhhhhhhhhhhhhhhh
ffs!
i thought it was ONE not an EL!
07-13-2005, 12:16 AM#8
Vexorian
you can rename it to level if you want, but change it in the return value too, and don't change the return and argument types