HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

whats wrong with this trigger?

12-14-2003, 02:07 PM#1
Murcielago)
ok its soposed to make any special effect the player wants on a unit (it can be anyone)

heres the screen

EDIT: i think the part with the arrows is the wrong part(of course i could be wrong)
12-14-2003, 02:14 PM#2
Murcielago)
its soposed to make create any spell on the unit the player has picked.

so when the player types:

effect 01 _____ (___ means it could be any spell)


then the trigger make the effect on the unit
12-14-2003, 02:24 PM#3
Murcielago)
np

it would look something like:

effect 01 bloodlust


its soposed to b like kooler's revenge
12-14-2003, 02:45 PM#4
Murcielago)
humm this is going to be harder than i though........ i think i may do this a bit differently then... btw what is D&D?? also thx a lot 4 ur help
12-14-2003, 05:15 PM#5
Taelrie
if you haven't fixed it yet I have found a bug in the editor which took me LITERALLY weeks to figure out. If you start an event using a Unit command as an event (X unit enters "some region") you CANNOT make an action using the player by saying "triggering player". Its a bug that got through (I don't know how) but anyway if you want that to work you actually have to say "owner of triggering unit". ... that really isn't your problem but I like to throw that around because a lot of people get tripped up by that.

But anyway I think in your trigger that you are using "picked unit" in the wrong terms. USMWE says the definition of "picked unit" is "the unit that is currently chosen at the time of the trigger". If the person has another unit picked at the time (which they usually do I know that if I have a bunch of things to do I just order the comand and click on something else) it will just cancel the trigger altogether. Of course that can be only 1 problem, there might be more
12-14-2003, 05:26 PM#6
Murcielago)
hummmm..... im not sure what you said about the "picked unit" is true bcuz theres a trigger that "picks" the unit selected by the player...tho i could b wrong emote_confused

heres what im talking about:
12-14-2003, 05:29 PM#7
Taelrie
Oops missed that :D my bad
12-14-2003, 05:42 PM#8
Murcielago)
since its oviusly way harder than i thought and im not sure what nathanmx said about the arrays.... im going to make much less effects then i wanted but there will be some good usefull effects..


BTW this is an rp map
12-14-2003, 07:34 PM#9
Vexorian
Also remember that effect paths in triggers use double "\" and that none of them end in mdx even when they are (odd stuff by your favorite company)

so it will be:

effect01Abilities\\Spells\\Orc\\Bloodlust\\BloodLustTarget.mdl
12-15-2003, 03:17 AM#10
dataangel
Quote:
Originally posted by Captn_Crunch
if you haven't fixed it yet I have found a bug in the editor which took me LITERALLY weeks to figure out. If you start an event using a Unit command as an event (X unit enters "some region") you CANNOT make an action using the player by saying "triggering player". Its a bug that got through (I don't know how) but anyway if you want that to work you actually have to say "owner of triggering unit". ... that really isn't your problem but I like to throw that around because a lot of people get tripped up by that.


Actually, you should be as specific as possible to avoid odd war3 behavior. Owner of Entering Unit in that case.
12-15-2003, 03:44 AM#11
QuatreDan
If I may, I'd like to take a swing at this. Ok, well, I'm not sure if this is time-efficient, but here's the method I use, which I believe was first thought up by a RolePlaying map creator named Miyog: ^_^
First, make a two string variable arrays. Name one something having to do with special effects (SFX, specialFX, etc.) and the other something along the lines of attachment point (fxattach, sfxattach, etc.) so that you know what they are (doi!). Also, make a special effect variable array that we'll use later.
Next, make a trigger that will set them up in the beginning of the game. The SFX one should look similar to:
Quote:
set SFX[1]=Abilities\Spells\Demon\DarkConversion\ZombifyTarget.mdx
set SFX[2]=Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdx
set SFX[3]=Abilities\Spells\Demon\DemonBoltImpact\DemonBoltImpact.mdx
set SFX[4]=Abilities\Spells\Demon\RainOfFire\RainOfFireTarget.mdx
set SFX[5]=Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdx
set SFX[6]=Abilities\Spells\Human\AerialShackles\AerialShacklesTarget.mdx
set SFX[7]=Abilities\Spells\Human\Avatar\AvatarCaster.mdx
set SFX[8]=Abilities\Spells\Human\Banish\BanishTarget.mdx
set SFX[9]=Abilities\Spells\Human\Blizzard\BlizzardTarget.mdx
set SFX[10]=Abilities\Spells\Human\Brilliance\Brilliance.mdx
set SFX[11]=Abilities\Spells\Human\CloudOfFog\CloudOfFog.mdx
etc...

This is the time-consuming part. You have to pretty much manually add all of the special effects this way.
You would assign the attachment points in a similar fassion.
The special effect trigger would then be something like:
Quote:
Event-
Player 1(-12) types in effect as a substring
Condition-
Substring((Entered Chat String,1,6)) equal to effect
Action-
Pick Every Unit owned by triggering player matching matching unit is selected by triggering player equal to true and do: (that I created to avoid some bug there =D)
Create special effect on FXATTACH[substring((entered chat string,7,7,))] of unit using SFX[substring((entered chat string,8,9{this can change depending on how many effects you've put in the sfx array, cuz, obviously, if you reach 100 and above, it would require 3 digits and an extra If statement}))]
set lastFX[Player Number of Triggering Player]= (Last Created Special Effect){this would be that special effect variable array I asked you to make earlier ^_^}

That should pretty much do it. Oh, and, of course, you'd make a trigger that if they typed in some other command, it would remove their last created special effect using that array we defined right at the end. Yay! I hope I helped! Good luck. :D :ggani:
12-15-2003, 03:19 PM#12
Murcielago)
[quote] the quotes below were riginaly posted by:nathanmx


Quote:
step #1>>First, make it so the player has to type only 2 letters instead of the whole word "effect". Mathematically, it will be 3 times faster than typing in the whole word (6 letters / 2 letters = 3 times faster). I would just us the letters "FX".

humm good idea will do :D

Quote:
step #2>>ok, so the 01/02 idea for the attachment points is ok, but create an optional quest that lists all the numbers and where the special effects can be added, assuming you want more than overhead and chest. the full list is below (in the quotation box)

yes that was definitly in the plans :D

Quote:
step #3>>further, make it so the player can type in part of the special effect path or pre-created words. if a player types in , for example:

fx 01 Orc\\Bloodlust\\BloodLustTarget.mdl

it would create the bloodlust effect on the overhead of the unit. the triggers would check to see if the part after "fx 01 " contained any of the following words: orc, nightelf, human, undead, demon, other, items. if a match is found, then the trigger would know to use the "________" part of "fx 01 _________" as a file path. (you would have to add the "Abilities\\Spells\\" to the beginning of the file path, but thats easily done with concatenate strings.) this is key for letting the player do any special effect at all. just remember to make another optional quest that says all the spells and their file paths. (see quotation box below)

by this you mean that a should be able to type:

FX 01 Demon\\DarkConversion\\ZombifyTarget.mdl

as well as:

FX 01 darkconversion

to get the same effect?
also how would i got about doing this?

Quote:
step #4>>if the part of "fx 01 " doesn't contain any of those words, then the triggers shoudl proccess it as a pre-constructed effect. You would check to see if the string is, for example, "dark portal", and the control statement would automatically use "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl" as the file path.

ok im not sure what this means, but i will give it a try......... so does it mean that is the part "FX 01" part does not have the "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl" part then it should check to see if it has "darkportal" in the string, then if it does then to use "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl"?


BTW did you make the triggers in your WE?
12-15-2003, 08:14 PM#13
QuatreDan
Well, you could have at least said "thanks but no thanks, Quatre; your idea sucks" rather than completely ignore my post...whatever...:nono: :(
12-15-2003, 08:23 PM#14
Murcielago)
im sry i didnt mean to ignore you... its not that ur way "sucks" its jus i didnt understand it :bgrun: .......im not too familir with WE... all i can do is mostly the landscape... and some triggers


umm how about you explain it a bit more .... who know i might use it :D
12-15-2003, 08:44 PM#15
QuatreDan
Ok...hmm...where do I begin? Ok, first off, I'm assuming that you know how to use variables and variable arrays. The system I will explain is pretty much what nathanmx was proposing...but in the end...is much easier, in my opinion. Ok, you have two string-type variable arrays. One of them will store a list of special effects paths, and the other will store the attachment points. You make a trigger, that at the start of the map, will set both variables to all of the different paths and such. Then the trigger that would add the special effect would be like this:
Quote:
Event-
Player 1 (Red) enters FX as a substring

Conditions-
Substring((Entered Chat String,1,2))=FX

'This makes sure that the first two letters of what the player typed in are, in fact, "FX".

Actions-

'This may get messy; read carefully

Pick Every unit in Units owned by Triggering Player matching Matching Unit is selected by Triggering Player=True and Do:

'This picks every unit that is selected and owned by the player that entered the message and does the following actions using those picked units.

Special Effect-Attach a special effect to the ATTACH[Substring((Entered Chat String,4,4))] of Picked Unit using FX[Substring((Entered Chat String,5,6))]

'This is the tricky part. ATTACH and FX are the variable arrays. What we're saying in between the [ ] are what part of the arrays we want to use. The Player will type in, for example, "FX 123". Lets start with the attachment point. It will use the attachment point that is in ATTACH[1]. Because the 4th letter in the message is 1. Next it uses the 5th and 6th letters, which in this example are 2 and 3 (23), to tell it to use whatever special effect path is in FX[23]. Having said that, lets say that ATTACH[1] is equal to "overhead" and FX[23] is equal to "Demon\DarkConversion\ZombifyTarget.mdl". This would then attach the special effect "Demon\DarkConversion\ZombifyTarget.mdl" to the overhead of the Picked Unit.

Do you get it yet? Or should I make an example map? emote_confused