PDA

View Full Version : Advanced Triggering


WarInSerbia
06-25-2007, 2:22 PM
As I could see,we got many new members lately:Omano, Killdare, SeaSerpent, Mixy and I think a bit more.
Whatsoever this will the thread for Advanced triggering,that should help our new members to understand what "powers" the world editor has.
I think that many of the questions will have a answer in darkhunters tread,but anyway.So post here question about actions or anything that includes the World editor.
Respectevly Warinserbia.:D

Blacker
06-26-2007, 5:03 AM
Very nice,but i think that people will ignore it! :(

WarInSerbia
06-28-2007, 9:48 AM
I have a question:
How to make that "shoot" thingy,when casted to spread out shockwaves around the hero (if you know what I mean),if don't,like poison nova in DotA.

edwinfong25
06-28-2007, 12:04 PM
well, basically speaking...

you'd have a dummy ability (Hero Ability) on the hero that is merely used to trigger the ability (typically a no target ability like thunder clap, or you could always use channel)
then you'd have to make an ability based upon Breath of Fire (or any of the abils that are similar to it, Breath of Frost, Shockwave, Carrion Swarm, Crushing Wave, etc.)
In that ability you'd set the damage, and the effects that you'd want (i'd recommend that it be a unit ability, without a mana cost)

Then you'd make a trigger for it :)
The Event would be A unit Starts the effect of an ability
The condition would check that its the hero's ability (the triggering ability)
then in the actions (there's a couple of ways to do it depending on how you'd want it...)
you could add the effect ability (the Breath of Fire(or the similar ones) based one) directly onto the hero... and have him cast it... but i probably wouldn't recommend it... for two reasons one the ability would show up unless you keep disabling and enabling the ability for the player...
secondly it might take a while for the hero to cast them all, resulting in it not being even or the same time

an alternative way would be to use dummy units (an invisible, non-selectable unit that the player shouldn't even notice is there (not visible, no shadow, no food count, etc.) (i'd also recommend him to be flying with no collision so that he wouldn't get displaced, but you could always change that with other ways as well)
with the dummy units, you could either make a specific dummy unit for each abil... (you'd make one only for this abil, and you'd add the ability right onto the unit in the object editor)
or you could use the dummy unit for every single triggered ability by adding every abil right onto the dummy unit (also through the object editor)
but, i'd personally recommend that you just have no abils on the dummy unit (except for the default ones like invulnerable and maybe locust)
then each time you'd create a dummy unit for the ability, you'd just add the ability required to the dummy unit (thus he can be reused, and there's no ability order conflicts) :)

now, you could either create one dummy unit and order him to cast it multiple times... but yet again, (depending on the abils and your settings)
this might take him a while, especially if you didn't change the cooldown...
so, what you could do would be to create a bunch of them and have each of them cast in a different direction :)

so... the trigger ought to be something according to this... ;)
the event would be: Unit - A unit Starts the effect of an ability
the condition would check: (Ability being cast) Equal to <your trigger ability>
the actions ought to be looped to make it easier for yourself:
and within the loop, it should create the dummy unit, add the ability (if it doesn't have it already), order the dummy unit to cast the ability, and then add an expiration timer to remove the unit... (no point leaving him there the rest of the game...)

so... perhaps something like this: :cool:
Bursting Effect
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to <your trigger ability>
Actions
For each (Integer A) from 1 to <how ever many effects that you want>, do (Actions)
Loop - Actions
Unit - Create 1 <Dummy Unit> for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
Unit - Add <Effect Ability> to (Last created unit)
Unit - Order (Last created unit) to <the order for the effect abilty that you used> ((Position of (Casting unit)) offset by 10.00 towards ((Real((Integer A))) x <the number of degrees between each of your effects>) degrees)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)

so... first off, i did not implement any leak removal as i tried to keep the explananation as simple as possible... so, you'll have to apply them yourself (if you dont know how, you could ask, or look it up) :)

now for some explanations: :)
the range for the loop will affect how many effects you would see in your ability...
the effect ability and it's order may vary depending on what ability you used as a base
the degrees between each of your effects would basically be 360/the number of effects mentioned in the range of the loop (this way it'll look evenly spaced, but you dont have to make them evenly spaced if you dont want)

and that's pretty much all there is to making the basics to this ability (keeping in mind that there are also countless ways to improve or change stuff in an attempt to make it different, such as using an impale based ability instead of the breath of fire type effect ability) :cool:

well, i hope that that solves your problem :)
good luck in your mapping endeavors :)

WarInSerbia
06-28-2007, 4:15 PM
Excelent,that just what needed,Thanks Edwinfong25 :tup:!

Sid
06-30-2007, 12:16 AM
Edwin, nice solution...
But far as i believe, The Poison Nova and Wild Axes use Slide Trigger. Similar to the Jump Map I demonstrated. Also, I have released Battleships Mini Game that demonstrates the Unit Sliding and hitting enemies. Ofc, you can turn the damage functions off and make a nice Ringwave of Chimera Missiles to simulate the Shockwave style blast.
So, I think you can give out the references of my previous maps. They inclue a good examples of triggering.

edwinfong25
06-30-2007, 1:16 AM
Actually, i'd think that they used this method for the poison nova... (not too sure about the other one) :confused:

besides, this way would be much easier than trying to detect the slide...
(especially if you wanted to add a poison effect? (just use the burning effect from Breath Of Fire, and change the buffs and stuff)) ;)

still, that's just my opinion... in the end its up to the person how they wish to do it, lol :)

WarInSerbia
06-30-2007, 8:24 AM
Cool,another problem.
I've been practicing with the triggers in a similiar way like abowe.I tried to make the space void's ability when he goes instantly to surounding units and attacks them,but with no sucess.

Is there a way to increase a units attack speed using triggers?

hooded
06-30-2007, 3:13 PM
via triggers add an ability based off of the item-attack speed increase abilities, such as that which would be on gloves of haste, or use the chaos ability to change the unit to a different unit with a lower base attack rate. The only way I know of to change base attack rate (not the IAS) of a unit is through morphing it (as seen in chemical rage), but for most cases, the gloves of haste ability would work fine.

edwinfong25
06-30-2007, 4:29 PM
yeah, as hooded said :D
you could either add an abil such as gloves of haste...
or morph the unit...

OR some other things: ;)
upgrade it with an upgrade... (just change the level of the research through triggers) (doubt that this would solve your problem tho, cuz it's only one time, and wont revert back)
also, you could add an abil like berserk
or have a dummy unit cast blood lust on the unit
or maybe even add an aura to the unit (one that only affects itself or something)

that's all that i can think of at the moment... :)
hopefully one of these would solve your problem, if not then please explain it a bit more... :)

also, i can't recall if i've ever seen that abil that you are referring to... :confused:
so, not sure what you mean by that... :concern:

Blacker
06-30-2007, 6:30 PM
You're going well with ideas for BiS,War'

WarInSerbia
07-01-2007, 6:36 AM
Should work,I'l try that.

You're going well with ideas for BiS,War'

Oh,well I want BiS to be interesting.

also, i can't recall if i've ever seen that abil that you are referring to...
so, not sure what you mean by that...

Evil space void,lvl 6 ability is to freeze time around him.

edwinfong25
07-01-2007, 12:34 PM
oh, that abil? i'd just assume that they just pause the units in range temporarily, then after a certain amount of time it would unpause them... :)

WarInSerbia
07-01-2007, 12:44 PM
no not that ability,his ability to quickly go to surounding units and quickly attack them.

edwinfong25
07-01-2007, 2:23 PM
hmm... i'd suppose that one way to do it could just be to use something like thunder clap... (it'd sorta be a combination of a blink-like ability with a thunder clap type of abil?) :confused:

not really too sure, lol (never really played him much, so i dont really know all the abils that well, lol) :)

WarInSerbia
07-01-2007, 2:44 PM
Then could you tell us for the abilities that you know how to do?

edwinfong25
07-01-2007, 3:53 PM
err... i dont know exactly if that'd be too good an idea... perhaps it'd be better off if you just listed a few and then we'd answer... :)
cuz first off, i dont actually "know" per say... but i suppose that i have a good idea as the the workings... :D
still, there are a lot of abils in there... and listing them all... probably not the best way... :concern:

still, i would like to add one thing...
besides the fact that asking for all of them is somewhat unreasonable... :concern:
i, personally would think that it'd be much better for you to come up with something on your own... cuz then it'll seem a bit more original... :cool:
(cuz i'm sure that everyone here would be willing to help you with any problems that you may come across whilst doing so...) ;)

still, just my opinion on this all, so do what you will :)

WarInSerbia
07-02-2007, 9:26 AM
Ok,thanks.I will.

he11g0tfi113d
07-06-2007, 4:02 PM
And can i get all the terms used in the map editor(if possible) ...like triggers,variables(not these but the rest like queing and stuff)- alongwith their uses

edwinfong25
07-06-2007, 10:41 PM
:o wow...

i really hope that you notice that you're asking for a whole lot... (its kinda unreasonable to be asking something like that... :() (you might as well just ask someone to make the map for you... :concern:)

i'm sure that if you narrowed it down a bit someone would help you...
(it's kinda the same idea as for what WarInSerbia had asked... please dont ask people for everything... ask some but also try to test some stuff on your own) :)

he11g0tfi113d
07-07-2007, 12:28 AM
ok i tried a lot and have come up with many good things so far and thnx but i really didn't mean to be a burden.....srry man but at least some things

edwinfong25
07-07-2007, 3:25 AM
well, we're glad to help you if you've got any questions :)
but its much easier if you're specific so that we can just answer the question... as opposed to asking for something so broad... cuz it becomes very troublesome to truly explain everything :)

WarInSerbia
07-08-2007, 1:47 PM
I tried to make that time walk ability but the only thing I did is to increase its atack speed,extremly!!
I also found a bug in DotA,when casting that ability with lots of friendly units around him,some creeps or HEROS will get that ability and will attack 1000% faster!!!

WarInSerbia
07-10-2007, 10:38 AM
What about the "Meat hook",how do you supose that they could done it?

Sid
07-11-2007, 10:47 AM
Meat Hook GUI and JASS templates are available on thehelper.net

WarInSerbia
07-13-2007, 10:55 AM
Thanks Sid,but somehow it doesent work(JASS), I guess I'l have to use the GUI ver. then,whats the diference beetwen a JASS and a GUI trriger?

btw:Any good ideas for spells,tell me?

uberfoop
07-13-2007, 11:46 AM
Um...

A GUI trigger is a trigger in the standard wc3 WE graphical format with the events/conditions/actions. A JASS trigger is a trigger in the JASS programming language format. GUI is just a representation of JASS which gets converted to JASS when you compile a map.

WarInSerbia
07-13-2007, 2:38 PM
I just found out how to convert GUI into Jass,but I heaven't found the convert to triggers button,and I already saved the map,I'm in trouble.
Can I reverse the progress somehow?

uberfoop
07-13-2007, 6:56 PM
I just found out how to convert GUI into Jass,but I heaven't found the convert to triggers button,and I already saved the map,I'm in trouble.
Can I reverse the progress somehow?
Of course not. GUI converts to JASS a specific way. JASS gives much more freedom. The conversion system can only convert one way simply because there is no standard conversion from JASS to GUI that could be recognizable.

It gets especially bad when you consider that the default converter fails at life. It's code conversion has all sorts of random unnessassary calls and if/then/else statements and stuff. People who know JASS write more efficiently than that, which is one of the reasons they use jass rather than GUI, so their code ends up looking MUCH different from a default conversion anyway.


Anyhow, when you converted to JASS, didn't a message come up telling you that it is irrversable? Because everyone elses WE does that. Specifically, this message I speak of should have been a good hint:

Once a trigger is converted to text it cannot be converted back.
You will be responsible for ensuring that the trigger works properly.

Continue anyway?

WarInSerbia
07-14-2007, 4:37 AM
Damn,oh well I've been warned :(.
Anyway do you know some spells I could check out in thehelper.net.
I saw that you are a member there as well :).

WarInSerbia
07-23-2007, 6:37 AM
Ok making progress,just this is blowing my frikin head off:
MULTIBOARDS

Damn I copied the one from the DotA template but NOTHING works,the text is fucked up and there are NO player names whatsoever.
Please help me!

edwinfong25
07-23-2007, 8:53 AM
well... erm... let's see... :confused:
first off... i'm not quite sure why you didn't just check Zipsco's tutorial from sid's... :concern:
also, would you mind explaining more of what you want to be done? (then i'll try to answer it, lol, cuz then i'll know what to be explaining... unless you actually want everything explained, lol?) :confused:

WarInSerbia
07-23-2007, 5:22 PM
well... erm... let's see...
first off... i'm not quite sure why you didn't just check Zipsco's tutorial from sid's...
also, would you mind explaining more of what you want to be done? (then i'll try to answer it, lol, cuz then i'll know what to be explaining... unless you actually want everything explained, lol?)

Link please :)
So I want the basics for a Aos map like Dota's.So clock,kills (not heroes,creep kills),if the hero is dead no timer,and player names.

btw:from my phone (NOKIA 6233) I acesed this FORUM,but still I can't log in with it and reply to you,but still is cool!!!!

Blacker
07-29-2007, 7:03 AM
FOR EVERYONE WHO HAS PROBLEM WITH MULTIBOARD:

download map below...

Don't say thanks!!! :P

WarInSerbia
07-29-2007, 2:28 PM
I tried but when I imported it into BIS the names were fucked up and everything.

Blacker
07-30-2007, 3:14 AM
Unfortunately,i didn't tried that too.Also,you have tutorial on SidWS...

WarInSerbia
07-30-2007, 4:20 AM
Unfortunately,i didn't tried that too.Also,you have tutorial on SidWS...
Lets check it out...
Anywho,lets get down with it,I downloaded some JASS powered spells (meat hook,and many more) and there is a problem,I set the custom code for the spell,also for the dummy unit but still it doesent work,must I change something else?
One more thing,I also copied the local vars for 4 spells and I have about 8 more,when I copy the local vars for those 8 spells WE shows a error for them,whats wrong?

uberfoop
07-31-2007, 6:41 AM
Post ALL the code and say specifically what you've been doing. I can't telepathically search your compy for the problem.

WarInSerbia
07-31-2007, 5:24 PM
I hope you mean this!
Ok here's the local vars imported in BIS for 4 P's spells:

function H2I takes handle h returns integer
return h
return 0
endfunction

// ===========================
function LocalVars takes nothing returns gamecache
// Replace InitGameCache("jasslocalvars.w3v") with a global variable!!
return InitGameCache("udg_TestCache")
endfunction

function SetHandleHandle takes handle subject, string name, handle value returns nothing
if value==null then
call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),n ame)
else
call StoreInteger(LocalVars(), I2S(H2I(subject)), name, H2I(value))
endif
endfunction

function SetHandleInt takes handle subject, string name, integer value returns nothing
if value==0 then
call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),n ame)
else
call StoreInteger(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction

function SetHandleBoolean takes handle subject, string name, boolean value returns nothing
if value==false then
call FlushStoredBoolean(LocalVars(),I2S(H2I(subject)),n ame)
else
call StoreBoolean(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction

function SetHandleReal takes handle subject, string name, real value returns nothing
if value==0 then
call FlushStoredReal(LocalVars(), I2S(H2I(subject)), name)
else
call StoreReal(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction

function SetHandleString takes handle subject, string name, string value returns nothing
if value==null then
call FlushStoredString(LocalVars(), I2S(H2I(subject)), name)
else
call StoreString(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction

function GetHandleHandle takes handle subject, string name returns handle
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleInt takes handle subject, string name returns integer
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleBoolean takes handle subject, string name returns boolean
return GetStoredBoolean(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleReal takes handle subject, string name returns real
return GetStoredReal(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleString takes handle subject, string name returns string
return GetStoredString(LocalVars(), I2S(H2I(subject)), name)
endfunction

function GetHandleUnit takes handle subject, string name returns unit
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleTimer takes handle subject, string name returns timer
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleTrigger takes handle subject, string name returns trigger
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleEffect takes handle subject, string name returns effect
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleGroup takes handle subject, string name returns group
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleLightning takes handle subject, string name returns lightning
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleWidget takes handle subject, string name returns widget
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction

function FlushHandleLocals takes handle subject returns nothing
call FlushStoredMission(LocalVars(), I2S(H2I(subject)) )
endfunction

//================================================== =============================
//================================================== =============================

function PolarProjectionX takes real x, real distance, real angle returns real
return x+distance*Cos(angle * (3.14159/180.0))
endfunction
function PolarProjectionY takes real y, real distance, real angle returns real
return y+distance*Sin(angle * (3.14159/180.0))
endfunction
function DistanceBetweenPointsXY takes real x1, real y1, real x2, real y2 returns real
return SquareRoot((x1 - x2)*(x1 - x2)+(y1 - y2)*(y1 - y2))
endfunction
function AngleBetweenPointsXY takes real x1, real y1, real x2, real y2 returns real
return Atan2((y2-y1),(x2-x1)) * (180.0/3.14159)
endfunction
function GetParabolaHeight takes real dist, real maxdist,real curve returns real
local real t = (dist*2)/maxdist-1
return (-t*t+1)*(maxdist/curve)
endfunction
function DistanceBetweenUnits takes unit A, unit B returns real
return SquareRoot((GetUnitX(A)-GetUnitX(B))*(GetUnitX(A)-GetUnitX(B))+(GetUnitY(A)-GetUnitY(B))*(GetUnitY(A)-GetUnitY(B)))
endfunction
function AngleBetweenUnits takes unit A, unit B returns real
return Atan2((GetUnitY(B)-GetUnitY(A)),(GetUnitX(B)-GetUnitX(A))) * (180.0/3.14159)
endfunction
function RoundR2I takes real r returns integer
return R2I(r+0.5)
endfunction
function IsIntDivisible takes integer int, integer divisor returns boolean
local integer i = int/divisor
local real r = I2R(int)/I2R(divisor)
if i == r then
return true
endif
return false
endfunction
function FadingText takes string msg, integer red, integer green, integer blue, real x, real y, real spd, real fadetime, real life returns nothing
local texttag t=CreateTextTag()
call SetTextTagText(t,msg,0.024)
call SetTextTagPos(t,x,y, 0.00)
call SetTextTagColor(t,red,green,blue,255)
call SetTextTagVelocity(t,0,spd)
call SetTextTagVisibility(t, true)
call SetTextTagFadepoint(t, fadetime)
call SetTextTagLifespan(t, life)
call SetTextTagPermanent(t, false)
set t=null
endfunction
function Chance takes integer chance returns boolean
return chance>=GetRandomInt(1, 100)
endfunction
function Msg takes string msg returns nothing
call DisplayTextToPlayer(Player(0), 0, 0, msg)
endfunction

And I want to combine this local vars with it.

// ===========================Damage Enemies System
function FilterIsEnemy takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(), bj_groupEnumOwningPlayer)
endfunction

function DamageEnemiesArea takes unit whichUnit, real radius, real x, real y, real amount, boolean attack, boolean ranged, attacktype attackType, damagetype damageType, weapontype weaponType returns nothing
local group g = CreateGroup()
local boolexpr b = Condition(function FilterIsEnemy)
local unit t
set bj_groupEnumOwningPlayer = GetOwningPlayer(whichUnit)
call GroupEnumUnitsInRange(g, x, y, radius, b)
call DestroyBoolExpr(b)
loop
set t = FirstOfGroup(g)
exitwhen t == null
call GroupRemoveUnit(g,t)
call UnitDamageTarget(whichUnit,t,amount,attack, ranged,attackType,damageType,weaponType)
endloop
call DestroyGroup(g)
set g = null
set b = null
endfunction
// ===========================









// ===========================Local Handle Vars By: Kattana
function H2I takes handle h returns integer
return h
return 0
endfunction

// ===========================
function LocalVars takes nothing returns gamecache
if udg_Cache == null then
call FlushGameCache(InitGameCache("somename"))
set udg_Cache = InitGameCache("somename")
endif
return udg_Cache
endfunction

function SetHandleHandle takes handle subject, string name, handle value returns nothing
if value==null then
call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),n ame)
else
call StoreInteger(LocalVars(), I2S(H2I(subject)), name, H2I(value))
endif
endfunction

function SetHandleInt takes handle subject, string name, integer value returns nothing
if value==0 then
call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),n ame)
else
call StoreInteger(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction

function SetHandleBoolean takes handle subject, string name, boolean value returns nothing
if value==false then
call FlushStoredBoolean(LocalVars(),I2S(H2I(subject)),n ame)
else
call StoreBoolean(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction

function SetHandleReal takes handle subject, string name, real value returns nothing
if value==0 then
call FlushStoredReal(LocalVars(), I2S(H2I(subject)), name)
else
call StoreReal(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction

function SetHandleString takes handle subject, string name, string value returns nothing
if value==null then
call FlushStoredString(LocalVars(), I2S(H2I(subject)), name)
else
call StoreString(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction

function GetHandleHandle takes handle subject, string name returns handle
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleInt takes handle subject, string name returns integer
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleBoolean takes handle subject, string name returns boolean
return GetStoredBoolean(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleReal takes handle subject, string name returns real
return GetStoredReal(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleString takes handle subject, string name returns string
return GetStoredString(LocalVars(), I2S(H2I(subject)), name)
endfunction

function GetHandleUnit takes handle subject, string name returns unit
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleLocation takes handle subject, string name returns location
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleTimer takes handle subject, string name returns timer
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleTrigger takes handle subject, string name returns trigger
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleEffect takes handle subject, string name returns effect
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleGroup takes handle subject, string name returns group
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleLightning takes handle subject, string name returns lightning
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleWidget takes handle subject, string name returns widget
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction

function FlushHandleLocals takes handle subject returns nothing
call FlushStoredMission(LocalVars(), I2S(H2I(subject)) )
endfunction
// ===========================

And now I tried to combine them (I just ctrl-c and ctrl-v at the bottom)
Also I imported the spells that use those local vars and disabled them.But still it shows a error to all lines under the 4 spells local vars.
I sure hope you understand what I'm trying to say.

bomber7
08-01-2007, 12:19 AM
... Are you trying to make yourself hard to understand? Or is it just irony seeping its way into our lives? Also I'd love to help you but the easiest way for me to do that is to put the code in Jass craft and examine it. Unfortunitly when I try it all comes out on one line. Please post the map containing the code.

WarInSerbia
08-05-2007, 10:26 AM
Well the spells I want to combine is the DotA random spell pack from wc3sear r something like that.And BIS which has 7 mb's.

Anyway I cracked the case and it works.Thanks for the help anyway.

TheDriver
08-06-2007, 8:47 PM
Ill guess ill add my question... Im trying to make a "jump ablity" how is it done.
And is it possible to make a spell be uncasted by a certain spell? And not others?

edwinfong25
08-06-2007, 11:21 PM
ok, let's see... for the jump ability... well, first off that would depend on how exactly you'd want the ability to work, lol
also, i can refer you to the one that sid had made a while back (apologies for linking back to an old thread) but it's not "necromancing" lol (well, it isn't as long as no one posts into it....) so, i'll call it "ghosting" the thread, lol ;)
http://www.warboards.org/showthread.php?t=25760

still, as sid indicated, it's not MUI, so if that's not what you need, then i can post more about making a jumping spell, lol, but it should still give you the general idea behind it all :cool:
although, personally, i think that i would make it differently... oh, nvm, i have made it differently before, lol
(i can explain how i would do it (probably not the best mind you, lol, but i'd say that it works, lol) if anyone requests it, lol) :)

also, for your spell countering thing... :D
kinda depends what you mean? :confused:
although, i'd assume that basically it'd just be some sort of triggering, such that you detect when units cast what spells... and then trigger most of the effects...

TheDriver
08-06-2007, 11:23 PM
For instace the antibiotics skill would cure the status bacteria.

edwinfong25
08-06-2007, 11:47 PM
sure, basically that's just a matter of removing buffs ;)
probably something like this :cool:
event - A Unit Starts the effect of an ability
condition - (Ability being cast) Equal to <the antibiotics spell>
actions - 'Remove specific buff' from the (target unit of ability being cast)

so, basically the antibiotics spell would be a dummy spell that doesn't do anything... ;)
and when its casted, you'd just remove the buff from the "bacteria" :)

TheDriver
08-08-2007, 1:00 AM
sure, basically that's just a matter of removing buffs ;)
probably something like this :cool:
event - A Unit Starts the effect of an ability
condition - (Ability being cast) Equal to <the antibiotics spell>
actions - 'Remove specific buff' from the (target unit of ability being cast)

so, basically the antibiotics spell would be a dummy spell that doesn't do anything... ;)
and when its casted, you'd just remove the buff from the "bacteria" :)
Ahh that's what i had figured.. I didnt know you could remove a Specific buff nice to know.