HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Like the Custom Script Action? I made a Custom Script Trigger Call

10-26-2003, 06:46 PM#1
Vexorian
Check the screenshot, You can do things like those, with the files inside this rar, unfortunnally you have to know about editing the editor, also make sure the functions are in your map.

Edit: I am updating the file, check above, Uploading the screenshot here now
10-27-2003, 09:17 AM#2
PitzerMike
hmm, so what does it do exactly?
10-27-2003, 11:14 AM#3
Vexorian
I don't know what happened with the screenshot I uploaded to the image host thread.

You can use Custom functions, local variables, and every script thing in normal GUI triggers.

Something like when you make a function that returns an item type (integer) called RandomArtifact()

You can do this in trigger actions:

Item - Create ((RandomArtifact())) at position of triggering unit
10-27-2003, 12:20 PM#4
PitzerMike
ah, I'll have a look at it
10-27-2003, 08:06 PM#5
Starcraftfreak
That's great. I think this will be in the next version of UMSWE as well as WEU. This is one of the most anticipated features for custom editors. You will get a credit of course Lord Vexorian.
10-27-2003, 09:44 PM#6
dataangel
I kept wishing the GUI had this =)
10-28-2003, 12:06 AM#7
Grater
Verry nice.

Another thing that would be extremely useful is some sort of JASS Code for "Hero Skill" so you could use something like:
(Learned Hero Skill) Equal to (HeroSkill('A001'))

Not that I cant just use this:
(GetLearnedSkillBJ()) Equal to Kasplat

You rock Vex :ggani:
10-29-2003, 08:15 PM#8
Vexorian
Quote:
Originally posted by Grater
Verry nice.

Another thing that would be extremely useful is some sort of JASS Code for "Hero Skill" so you could use something like:
(Learned Hero Skill) Equal to (HeroSkill('A001'))

Not that I cant just use this:
(GetLearnedSkillBJ()) Equal to Kasplat

You rock Vex :ggani:


You are right, Hero Skills are different than abilities, I 'll have to update this.

Edit: Updated the files with Hero Skills support, the files have a //new before the new stuff for easier re-import

Rate it please
10-31-2003, 10:36 PM#9
Sage the Mage
Heh time to hack my UMSWE editor again it seems :)

There's really no reason for heroskillcode it seems, that and abilitycode are interchangeable.
11-01-2003, 08:16 PM#10
Vexorian
They are but the editor is just a mess of unexistant variable types, you know I could make the return integer function to work for ability, unit type , item type, order , and heroskill , but the editor doesn't work like that.
11-17-2003, 12:06 AM#11
theJ89
I can't seem to figure out how this is possible, explain to me.

What did you do to get here?

One thing - I never saw the word "local" anywhere.
Nor did I see anything that sets the name of the local.
All I saw were entries for function calls, function strings for GUI, and the actual functions just returned whatever you gave them. PLEASE explain how you did this.

Hmm... the function call entries have "scriptcode". Is this what names the locals?
11-17-2003, 06:37 AM#12
PitzerMike
This hasn't got to do anything with locals.

For example if you have a JASS function in your map header that is called GetClosestUnit that takes a unit as parameter and returns a unit you can now call this function from withing a GUI statement.

For Example: Issue 'move' order for unit <whatever> to Position of <GetClosestUnit(whatever)>
11-17-2003, 01:28 PM#13
Vexorian
Quote:
Originally posted by theJ89
I can't seem to figure out how this is possible, explain to me.

What did you do to get here?

One thing - I never saw the word "local" anywhere.
Nor did I see anything that sets the name of the local.
All I saw were entries for function calls, function strings for GUI, and the actual functions just returned whatever you gave them. PLEASE explain how you did this.

Hmm... the function call entries have "scriptcode". Is this what names the locals?


That's how it works, let's test the return integer one,

there is a function that

function ReturnInteger takes integer a returns integer
return a
endfunction

that's a pretty dumb function that does nothing

the scriptcode is just the parameter type used in the "custom Script" - actions it makes the editor take whatever you write without turning it into string with "s.

So I made the returnInteger function, and tricked to the editor that it takes whatever you want

Then after editing stuff

set Custom value of (triggering unit) to (GetRandomInt(1,34))

When compiling It will replace it into:

call SetUnitUserdata( GetTriggerUnit(), ReturnInteger(GetRandomInt(1,34)))


Since you can put everything there and the editor won't change it, you can use any JASS function / or even local variables inside the gui action
11-17-2003, 10:03 PM#14
theJ89
Hmm, Ok, If I understand this right, The Return Integer Function is just a dummy function used to trick the editor, and the scriptcode setting lets you specify the name of a global or local?

Erm, I mean, any custom script code?
11-17-2003, 10:46 PM#15
PitzerMike
yep, you may put in the name of a local variable