Trigger Unhappy... (quest)

Penguin-

Member
Reaction score
4
I've scoured this forum for previous posts about triggers like the one im attempting, but to no avail.

I want to set a quest, that when activated it randomly selects an enemy hero that u have to kill. Think of DotA, when this quest is activated it randomly selects a hero on the enemy team for you to kill.
(dont worry about E and C i've got those sorted)
This is what ive got so far....
---------------------------
E: Quest- Create a Optional quest titled Contract with the description Contract, using icon path Replaceable.......Ambush.blp
Set Contract= (last created quest)
---------------------------
Thats it :D

All i need to know is how to get it to randomly select an enemy hero for me to attack.

Ideally i would like....
"Trigger starts"
---> Your contract is for Player 8.
"Flashy lights over where player 8 is"

Thats all, the rest i can work out myself :D

Thanks, and remember kiddies im on RoC :P

Peng (resident RoC aggrevator)
 
well guess wat im noton roC or JASS, im on wat came with my game :D

soooooo its apparently harder for me to make triggers, but its quite easy wat ur looking for: look for an action

unit:select random unit

as one of ur actions in addition to the rest of watever u have, now this might not wurk because ive made a grand total of 5triggers and only 2work

but try my :nuts: ideas anyway, if u donttry it ull oblige me to: :banghead: and then to: :banghead: again, but then people will think im :nuts: so be nice and try the noobies instructions.

u can find almost anything in triggers, remember that my apprentice
 
in ur dreams

technically u r already the master because ur useing a more advanced program than i am :D

"one day"is already here! o noes!im a pupil!
 
Right ive been working on it and this is what ive got, but its not working...
Its giving me all the text etc, but there is a problem with the "matching unit" variable, its not selecting an enemy hero.
____________________________________________________
E: Map Init
A:- Quest - Create a Optional quest titled Contract with the description Contract, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
- Set Contract = (Last created quest)
-Selection - Select (Random unit from (Units in (Playable map area) matching ((((Targeted unit) is A Hero) Equal to True) and (((Targeted unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))))
-Set Selected = (Matching unit)
-Animation - Change (Targeted unit)'s size to (300.00%, 300.00%, 300.00%) of its original size
-Game - Display to (All players) the text: (your contract is for + (Name of (Owner of (Matching unit))))
____________________________________________________

I included the huge size growth of the "matching unit" so i can quickly see if it has worked, it is not for keeps :D

Can anyone help me, select the enemy hero??
 
*bump* somone must know, it cant be that hard.

Just a trigger to randomly select an enemy hero....


Peng :confused:
 
I think you don't understand the event response units in the right way.

Matching unit is used in conditions and is only stored for that condition, after that you can't use it anymore.

Targeted unit is only useable if the event is a spell with a unit target, like polymorph.

What you've got to do:

Code:
(Random unit from (Units in (Playable map area) matching ((((Targeted unit) is A Hero) Equal to True) and (((Targeted unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))))
is allright, but you don't have to select the hero (you even can't if it isn't visible at the moment of the running of the action). You've got to set a unit variable to it. So something like this:

Code:
Set RandomEnemyHero = (Random unit from (Units in (Playable map area) matching ((((Targeted unit) is A Hero) Equal to True) and (((Targeted unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))))

Then run every action you want on that unit in the variable.
 
:banghead: :banghead: :banghead: :banghead:
-----------------------------------------------------------------------
E: Unit - A unit owned by Player 1 (Red) Spawns a summoned unit

A:-Set RandomEnemyHero = (Random unit from (Units in (Playable map area) matching (((Owner of (Targeted unit)) Equal to (Random player from (All enemies of (Owner of (Triggering unit))))) and (((Targeted unit) is A Hero) Equal to True))))
-Quest - Create a Required quest titled You have to kill... with the description (Name of (Owner of (Targeted unit))), using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
-Camera - Pan camera for (Owner of (Triggering unit)) to (Position of (Targeted unit)) over 1.00 seconds
-----------------------------------------------------------------------

This isnt working, it not selecting the enemy hero or panning to him (just pans to middle of map)

please help, im completely stuck :(

Peng
 
Ahem... Maybe you should read my post better:

"Targeted unit is only useable if the event is a spell with a unit target, like polymorph."

Clearly? DO NOT USE TARGETED UNIT!

"Then run every action you want on that unit in the variable."

Use the variable (RandomEnemyHero in the case of my post) instead. But watch out: If multiple players take this quest at the same time, the variable will only be set to the last chosen hero! You might want to use arrays to have a different variable for every player.

Ok, to make it a little easier for you, I will correct the trigger:

Code:
E: Unit - A unit owned by Player 1 (Red) Spawns a summoned unit

A:-Set RandomEnemyHero = (Random unit from (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to (Random player from (All enemies of (Owner of (Triggering unit))))) and (((Matching unit) is A Hero) Equal to True))))
-Quest - Create a Required quest titled You have to kill... with the description (Name of (Owner of (RandomEnemyHero))), using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
-Camera - Pan camera for (Owner of (Triggering unit)) to (Position of (RandomEnemyHero)) over 1.00 seconds
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Happy Thursday!
  • 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
    +1
  • 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 Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top