Smart person plz help!

  • Thread starter Thread starter spectre237
  • Start date Start date
S

spectre237

Guest
Well first of all I'm kinda noob with this stuff so plz bear with me if you will. I'm trying to import this 'omnislash' type spell that vexorian made and I dlded the template system it requires and imported it correctly and everything. But when I try to import the spell and replace the raw codes and stuff, when I try to save the map I still get this 'expected a function name' error. This error occures where the trigger tries to set the default damage, range, ect.

I'm sure this is proly something very simple to fix, but like I said I'm really kinda noob at this stuff, so any advice, or info you could give me on this would be most appreciated, and I would be happy to submit any other information that you would happen to need from me. Thanks so much. ;)
 
Post your triggers, it is something to do with jass I'm thinking.
 
Yes it's a jass scrpit sigh...(confusing).

Anyway here it is:

PHP:
//***************************************************************************************************
//*
//* Slash Template
//* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
//* Requires:
//*          -A triggerer ability ( Unit targetable please)
//*          -The Caster System
//*          -The Alternative Spell Templates System
//*          -This Trigger
//*
//* Art: The Triggerer ability has art fields that are considered:
//* - Caster effect is attached twice to the hero during the slash.
//* - Second and Third Caster Effects are attachment points for the Caster Effect
//* - Special effect is used on the feet of the hero before teleporting to slash
//* - Target art is the target effect, or the periodic damage effect if used, and the
//*   second target effect is its attachment point.
//*
//***************************************************************************************************

//===================================================================================================
// Slash Template Configuration:
//
function SlashTemplateSetup takes nothing returns nothing
 local integer D //An integer variable we use later to save the Damage Options so we give them to the templates
 local integer s //An integer variable we use later to save the rawcodes of spells to save some time

 //===================================================================================================
 // Template Info:
 //
 // Template Name Id = "SlashTemplate"
 //
 // The hero just gets teleported and attacks the targets fast, it looks nice and allows to cast
 // a spell, do damage, damage per second, and also has options for the way to choose targets and
 // factor for each target and that stuff.
 //
 //
 // integer "totalhits"  The maximum number of hits done per cast
 // real    "dmg"        The initial damage
 // real    "PDmg"       The initial Periodic Damage
 // real    "PDmgPeriod" The period of the Periodic Damage
 // real    "PDmgDur"    The Duration of the periodic Damage
 //
 // real    "dmgfct"     The factor per target for the damage, each time the unit hits a target,
 //                      the damage will be multiplied by this value to get reduced or incremented
 //
 // integer "Spell"      Rawcode of the Spell to cast (if any)
 // real    "SpellHeight" Height of the caster that casts the spell to cast
 // integer "OrderId"    Order Id of that spell
 // real    "RecDelay"   Caster Recycle delay for that spell
 //
 //
 // real    "area"       The new target detection range
 // integer "canrepeat"  Is 1 if the slash can repeat targets, otherwise 0
 //
 // integer "SelMethod"  Is 0 if the slash should pick the closest unit, 1 to pick random units
 // integer "SlashKind"  The kind of the Slash, 0 will try to get to the back of the unit, 1
 //                      will attack in random direction, and 2 is a combination of both
 //
 // integer "AngleKind"  Is 0 for the default angle kind, is 1 to multiple the angle by -1
 //
 // string  "animation"  The animation used by the slash
 //
 // integer "colorize"   If it is 1 enables casting unit "colorizing"
 // integer "SlashColor" Color in 0xAARRGGBB form for the duration of the slash 
 // integer "EndColor"   Color in 0xAARRGGBB form after the slash (original color of the hero)
 // 

 // integer "DamageOptions" Caster System Damage Options in saveable form, used to determine which
 //                         units can be attacked by the slash, if the damage factor is 0 the unit
 //                         is not affected by the target spells nor damage, otherwise the value
 //                         is only important as a damage factor.


 //===================================================================================================
 // Slash template Defaults:
 //
    call SetTemplateDefaultInt(   "SlashTemplate", "totalhits", 1) //Default Total Hits is 1
    call SetTemplateDefaultInt(   "SlashTemplate", "canrepeat", 0) //Can't repeat targets
    call SetTemplateDefaultReal(  "SlashTemplate", "area", 100)    //Default area is 100
    call SetTemplateDefaultReal(  "SlashTemplate", "dmg", 150)     //Default initial damage is 150
    call SetTemplateDefaultReal(  "SlashTemplate", "dmgfct", 1)    //Default damage factor is 1
    call SetTemplateDefaultString("SlashTemplate", "animation", "attack slam") //Default animation is attack slam
    call SetTemplateDefaultInt(   "SlashTemplate", "SlashColor", 0xFFFFFFFF)   //Default slash color is 255-255-255-255
    call SetTemplateDefaultInt(   "SlashTemplate", "EndColor"  , 0xFFFFFFFF)   //Default end color is 255-255-255-255

 //===================================================================================================
 // Cold Slash ('A006')
 //
 set s=SetSpellTemplate('A006',"SlashTemplate")
 set D=0                                                //Cold Slash Options :
 set D=DamageTypes(ATTACK_TYPE_NORMAL,DAMAGE_TYPE_COLD) //Cold spell damage
 set D=DamageOnlyEnemies()                              //Only hurt enemies
 set D=CreateDamageOptions(D)                           //Save the damage options

    call SetAbilityDataInt( s,"totalhits",1,3) //Level 1: 3 hits
    call SetAbilityDataInt( s,"totalhits",2,5) //Level 2: 5 hits
    call SetAbilityDataInt( s,"totalhits",3,7) //Level 3: 7 hits

    call SetAbilityDataReal(s,"dmg",1,150) //Level 1: 150 damage
    call SetAbilityDataReal(s,"dmg",2,200) //Level 2: 200 damage
    call SetAbilityDataReal(s,"dmg",3,250) //Level 3: 250 damage

    call SetAbilityDataReal(s,"area",1,360) //Level 1: 360 area
    call SetAbilityDataReal(s,"area",2,370) //Level 2: 370 area
    call SetAbilityDataReal(s,"area",3,380) //Level 3: 380 area


    call SetAbilityDataInt( s,"DamageOptions",0,D)   //Using the damage options saved before

    call SetAbilityDataString(s,"animation",0,"attack slam") //Use attack slam animation

 //===================================================================================================
 // Fire Slash ('A00D')
 //
 set s=SetSpellTemplate('A00D',"SlashTemplate")
 set D=0                                                //Fire Slash Options :
 set D=DamageTypes(ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE) //Fire spell damage
 set D=DamageOnlyEnemies()                              //Only hurt enemies
 set D=CreateDamageOptions(D)                           //Save the damage options

    call SetAbilityDataInt( s,"totalhits",0,5) //5 Hits

    call SetAbilityDataReal(s,"dmg",1,200) //Level 1: 200 damage
    call SetAbilityDataReal(s,"dmg",2,270) //Level 2: 270 damage
    call SetAbilityDataReal(s,"dmg",3,340) //Level 3: 340 damage

    call SetAbilityDataReal(s,"area",0,500) //Always 500 of area

    call SetAbilityDataInt( s,"SlashKind",0,2)   //Slash Kind is 2
    call SetAbilityDataInt( s,"canrepeat",0,1)   //It can repeat targets!

    call SetAbilityDataReal(s,"dmgfct",0,0.75) //Will lose 25% of the damage per target

    call SetAbilityDataString(s,"animation",0,"attack") //Use attack animation

    call SetAbilityDataInt( s,"DamageOptions",0,D)   //Using the damage options saved before


endfunction

K, I think that should be all the info that you would need, srry if this is a bit long, I need to know how to create that little 'page within a page' thing when posting replies, hehe. Thanks alot for the help. :)
 
Oh cool nvm I guess I figured out the 'page within a page' thing myself lol! Anyway if you need more of the trigger, I'd be happy to post it.
 
Hm.. could you remove the things behind the //'s in your post. Those are unedded, they are only comments. Will make it shorter and easier to fix.
 
K, hope that helps srry bout that, dunno why it's all different colors. :confused:
PHP:
Slash Template
 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Requires:
         -A triggerer ability ( Unit targetable please)
         -The Caster System
         -The Alternative Spell Templates System
          -This Trigger

 Art: The Triggerer ability has art fields that are considered:
 - Caster effect is attached twice to the hero during the slash.
 - Second and Third Caster Effects are attachment points for the Caster Effect
 - Special effect is used on the feet of the hero before teleporting to slash
 - Target art is the target effect, or the periodic damage effect if used, and the
   second target effect is its attachment point.

==============================================================


 Slash Template Configuration:

function SlashTemplateSetup takes nothing returns nothing
 local integer D //An integer variable we use later to save the Damage Options so we give them to the templates
 local integer s //An integer variable we use later to save the rawcodes of spells to save some time

=============================================================
 Template Info:

 Template Name Id = "SlashTemplate"
 
  The hero just gets teleported and attacks the targets fast, it looks nice and allows to cast
  a spell, do damage, damage per second, and also has options for the way to choose targets and
  factor for each target and that stuff.
 
 
  integer "totalhits"  The maximum number of hits done per cast
  real    "dmg"        The initial damage
  real    "PDmg"       The initial Periodic Damage
  real    "PDmgPeriod" The period of the Periodic Damage
  real    "PDmgDur"    The Duration of the periodic Damage
 
  real    "dmgfct"     The factor per target for the damage, each time the unit hits a target,
                       the damage will be multiplied by this value to get reduced or incremented
 
  integer "Spell"      Rawcode of the Spell to cast (if any)
  real    "SpellHeight" Height of the caster that casts the spell to cast
  integer "OrderId"    Order Id of that spell
  real    "RecDelay"   Caster Recycle delay for that spell
 
 
  real    "area"       The new target detection range
  integer "canrepeat"  Is 1 if the slash can repeat targets, otherwise 0
 
  integer "SelMethod"  Is 0 if the slash should pick the closest unit, 1 to pick random units
  integer "SlashKind"  The kind of the Slash, 0 will try to get to the back of the unit, 1
                       will attack in random direction, and 2 is a combination of both
 
  integer "AngleKind"  Is 0 for the default angle kind, is 1 to multiple the angle by -1
 
  string  "animation"  The animation used by the slash
 
  integer "colorize"   If it is 1 enables casting unit "colorizing"
  integer "SlashColor" Color in 0xAARRGGBB form for the duration of the slash 
  integer "EndColor"   Color in 0xAARRGGBB form after the slash (original color of the hero)
  

  integer "DamageOptions" Caster System Damage Options in saveable form, used to determine which
                          units can be attacked by the slash, if the damage factor is 0 the unit
                          is not affected by the target spells nor damage, otherwise the value
                          is only important as a damage factor.


 ===================================================================================================
  Slash template Defaults:
 
    call SetTemplateDefaultInt(   "SlashTemplate", "totalhits", 1) //Default Total Hits is 1
    call SetTemplateDefaultInt(   "SlashTemplate", "canrepeat", 0) //Can't repeat targets
    call SetTemplateDefaultReal(  "SlashTemplate", "area", 100)    //Default area is 100
    call SetTemplateDefaultReal(  "SlashTemplate", "dmg", 150)     //Default initial damage is 150
    call SetTemplateDefaultReal(  "SlashTemplate", "dmgfct", 1)    //Default damage factor is 1
    call SetTemplateDefaultString("SlashTemplate", "animation", "attack slam") //Default animation is attack slam
    call SetTemplateDefaultInt(   "SlashTemplate", "SlashColor", 0xFFFFFFFF)   //Default slash color is 255-255-255-255
    call SetTemplateDefaultInt(   "SlashTemplate", "EndColor"  , 0xFFFFFFFF)   //Default end color is 255-255-255-255

====================================================================== 
  Cold Slash ('A006')
 
 set s=SetSpellTemplate('A006',"SlashTemplate")
 set D=0                                                //Cold Slash Options :
 set D=DamageTypes(ATTACK_TYPE_NORMAL,DAMAGE_TYPE_COLD) //Cold spell damage
 set D=DamageOnlyEnemies()                              //Only hurt enemies
 set D=CreateDamageOptions(D)                           //Save the damage options

    call SetAbilityDataInt( s,"totalhits",1,3) //Level 1: 3 hits
    call SetAbilityDataInt( s,"totalhits",2,5) //Level 2: 5 hits
    call SetAbilityDataInt( s,"totalhits",3,7) //Level 3: 7 hits

    call SetAbilityDataReal(s,"dmg",1,150) //Level 1: 150 damage
    call SetAbilityDataReal(s,"dmg",2,200) //Level 2: 200 damage
    call SetAbilityDataReal(s,"dmg",3,250) //Level 3: 250 damage

    call SetAbilityDataReal(s,"area",1,360) //Level 1: 360 area
    call SetAbilityDataReal(s,"area",2,370) //Level 2: 370 area
    call SetAbilityDataReal(s,"area",3,380) //Level 3: 380 area


    call SetAbilityDataInt( s,"DamageOptions",0,D)   //Using the damage options saved before

    call SetAbilityDataString(s,"animation",0,"attack slam") //Use attack slam animation

 //===================================================================================================
 // Fire Slash ('A00D')
 //
 set s=SetSpellTemplate('A00D',"SlashTemplate")
 set D=0                                                //Fire Slash Options :
 set D=DamageTypes(ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE) //Fire spell damage
 set D=DamageOnlyEnemies()                              //Only hurt enemies
 set D=CreateDamageOptions(D)                           //Save the damage options

    call SetAbilityDataInt( s,"totalhits",0,5) //5 Hits

    call SetAbilityDataReal(s,"dmg",1,200) //Level 1: 200 damage
    call SetAbilityDataReal(s,"dmg",2,270) //Level 2: 270 damage
    call SetAbilityDataReal(s,"dmg",3,340) //Level 3: 340 damage

    call SetAbilityDataReal(s,"area",0,500) //Always 500 of area

    call SetAbilityDataInt( s,"SlashKind",0,2)   //Slash Kind is 2
    call SetAbilityDataInt( s,"canrepeat",0,1)   //It can repeat targets!

    call SetAbilityDataReal(s,"dmgfct",0,0.75) //Will lose 25% of the damage per target

    call SetAbilityDataString(s,"animation",0,"attack") //Use attack animation

    call SetAbilityDataInt( s,"DamageOptions",0,D)   //Using the damage options saved before


endfunction
 
Ok, I got it. I dont know how to fix it, but the reason it does that, is because its addressing a function it doesnt know, hasn't been created, or hasn't been addressed in the trigger yet. (I think, correct me if im wrong.)
 
Hmmm, yeah that would certainly make sense, all I did was copy/paste the script, name the trigger, and replace the rawcodes. I dunno is there anything else that needs to be done?
 
god so much comment and u will get lost i removed the coments and i found 1 little error there's 2 set's in the same line.
function SlashTemplateSetup takes nothing returns nothing
//Local Varibles
local integer D
local integer s
//Arguments
call SetTemplateDefaultInt( "SlashTemplate", "totalhits", 1)
call SetTemplateDefaultInt( "SlashTemplate", "canrepeat", 0)
call SetTemplateDefaultReal( "SlashTemplate", "area", 100)
call SetTemplateDefaultReal( "SlashTemplate", "dmg", 150)
call SetTemplateDefaultReal( "SlashTemplate", "dmgfct", 1)
call SetTemplateDefaultString("SlashTemplate", "animation", "attack slam")
call SetTemplateDefaultInt( "SlashTemplate", "SlashColor", 0xFFFFFFFF)
call SetTemplateDefaultInt( "SlashTemplate", "EndColor" , 0xFFFFFFFF)
set s = SetSpellTemplate('A006',"SlashTemplate")
set D = 0
set D = DamageTypes(ATTACK_TYPE_NORMAL,DAMAGE_TYPE_COLD)
set D = DamageOnlyEnemies()
set D = CreateDamageOptions(D)
call SetAbilityDataInt( s,"totalhits",1,3)
call SetAbilityDataInt( s,"totalhits",2,5)
call SetAbilityDataInt( s,"totalhits",3,7)
call SetAbilityDataReal(s,"dmg",1,150)
call SetAbilityDataReal(s,"dmg",2,200)
call SetAbilityDataReal(s,"dmg",3,250)
call SetAbilityDataReal(s,"area",1,360)
call SetAbilityDataReal(s,"area",2,370)
call SetAbilityDataReal(s,"area",3,380)
call SetAbilityDataInt( s,"DamageOptions",0,D)
call SetAbilityDataString(s,"animation",0,"attack slam")
set s = SetSpellTemplate('A00D',"SlashTemplate")
set D = 0
set D = DamageTypes(ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)
set D = DamageOnlyEnemies()
set D = CreateDamageOptions(D)
call SetAbilityDataInt( s,"totalhits",0,5)
call SetAbilityDataReal(s,"dmg",1,200)
call SetAbilityDataReal(s,"dmg",2,270)
call SetAbilityDataReal(s,"dmg",3,340)
call SetAbilityDataReal(s,"area",0,500)
call SetAbilityDataInt( s,"SlashKind",0,2)
call SetAbilityDataInt( s,"canrepeat",0,1)
call SetAbilityDataReal(s,"dmgfct",0,0.75)
call SetAbilityDataString(s,"animation",0,"attack")
call SetAbilityDataInt( s,"DamageOptions",0,D)
endfunction
 
K, dang I'm lookin' for the spot you're speaking of, but cannot seem to find it :banghead: . Maby you could underline it or put quotes around it or somthing? :)
 
Oh ok so you indeed did fix the prolem. I guess I should be able to just copy/paste your script then. Alright then Ima try it out I'll post again in just a sec and let you know how it turned out. :)
 
spectre237, i could help you if u send me the link of this ability.
thanks
 
well , i checked the map u will need to use the caster system ..
look in your map did u have triggers in your world editor?
you will have to import the objects of editor and import triggers to yours... first check if your map is empty beacuse it will overwrite the files that are in trigger editor and object editor. u need the caster system. i never used this, but it sounds very usefull :)
 
K, Ima go gab some dinner real quick, I'm starving. :( Take me like 20 min and I be right back.
 
well post :
>>well , i checked the map u will need to use the caster system ..
look in your map did u have triggers in your world editor?
you will have to import the objects of editor and import triggers to yours... first check if your map is empty beacuse it will overwrite the files that are in trigger editor and object editor. u need the caster system. i never used this, but it sounds very usefull :)
u have to copy the ability that u want. and put in your map for the trigger find the data base and make the changes.
 
Ok I'm back (yum taco villa :) ) K, first of all, I've got the caster system on my map already and have used it in the importation of previous triggers. I have also imported the actual ability into my maps' object editor as well and used it's rawcode for the template. I don't think I need to import all the object data into my map, just all data that applies to the ability, so that I don't have to lose all my previous data, this is according to Vex at least. Anyway I'm almost sure I preformed all of the outlined instructions correctly, there must be something I'm either not doing or doing wrong, I dunno.
 
ok i tried to import and export triggers and worked normaly are u sure u have lemme check ..
im using weu do you have weu?
did u copy and paste or import and export?
use import export.
here works normaly
and also please read the error compile for i see what's wrong ;/
EDITED: i think i know what's going on.. your are copying and pasting ...
u need to import and export ... check the varibles... i think u are not copying the varibles!!!
 
Ok yeah I did copy/paste the trigger as well as the ability in object editor. If I have to import/export, does that mean I lose all my current data???

No I do not have wue, if it's something you think I need, by all means, TELL ME WHERE TO GET IT. :)

And are you saying I have to import/export the trigger, ability in object eitor, both???

OK!
No for some reason I had trouble cpy/paste variables, so I just created all new ones with the same names. :D Is this wrong? And if it is plz tell me how to actually copy/paste them, hehe.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.
  • The Helper The Helper:
    Also, anyone who is reading this and is sad - don't be, turn off the Internet, step away from the box - enjoy your life - there is so much more out there for you than there is here for you.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top