• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Noob cinematic question

Status
Not open for further replies.
Level 3
Joined
Sep 7, 2009
Messages
22
Alright, I'm fairly new to the editor so my question is probably a simple one. Sorry about that. :grin:
What I'm trying to do is make the same cinematic play when three different people enter a region. But, after it plays for one person I don't want it to play for them again.
So far I have my cinematic, but whenever a unit enters the region it plays regardless of how many times you have seen it.

Any help?
 
Level 11
Joined
Feb 14, 2009
Messages
884
1) Go to the Trigger Editor
2) In one of your triggers, create an action "Set <Variable>"
3) There's a box on the right which reads "Edit Variables" or something like that; click it.
4) Create a new boolean variable and check the "Array" checkbox.
5) In your region's event, create an action as Maker says.

  • Events
    • Unit - Unit enters Region
  • Conditions
  • Actions
    • Set YourVar(Player number of (owner of (Triggering Unit))) = True
Use multiple if IF sentences to check whether a player has entered that region or not, and set the booleans accordingly.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

Ok here we go:

Open your Trigger Editor. You see at top the "X" - klick it.

1) A new window is open. In this window klick the +X
2) A new window is open again. Now you type in a name you want, for example "Var". By variable type - you select boolean. Now mark the box for "Array". Now klick 2 times on "Ok" and we are back to the trigger editor.

3) Now create a new trigger. I named it for example "TestTrigger".
4) Add a new events: Klick right on event > New event. Now scroll down to "Unit - Unit enters region". Klick on Region. A new window open, where you can choose your Region. (In my example I named it "TestRegion"). Klick "ok" and "ok" again and we should be back to the normal Trigger Editor window.
  • TestTrigger
    • Events
      • Unit - A unit enters TestRegion <gen>
    • Conditions
    • Actions
(Thats what we got up to here)

5) Now the action: Klick right on actions -> new action. A new window open: In this window you see "Do nothing". Klick on this and look for "Set Variable" (Its the 8 from top") and klick it.

5.1) Now you see "Set Variable = value". Klick on Variable, choose your created variable and press ok. Now you see "Set Var[Index] = value". Now you klick on [Index]

5.2) In the new window you click on the Function line. Here you need scroll down to: "Player - Player Number" and klick it. Now you see " Player Number of Triggering Player". Klick on Triggering Player and a new window open. Klick again on the function line and klick on "Owner of Unit". Now press 2 times on "ok".

5.3) Now we back to the first action window. We see: " Set Var[(Player Number of (Owner of (Triggering Unit))] = value. Now you klick Value.

5.4) Now in the new window you see at the bottom: Value "True" "False". Klick on "true" and klick twice on "ok"

6) And what we have:
  • TestTrigger
    • Events
      • Unit - A unit enters TestRegion <gen>
    • Conditions
    • Actions
      • Set Var[(Player number of (Owner of (Triggering unit)))] = True
So I did my best by this explanation - hope you understand it =)
 
Level 3
Joined
Sep 7, 2009
Messages
22
1. you forgot the condition.
2. I think he means, if one of the three players enters this point, noone is able to rewatch it.

to 2. just remove the array thing, and add a condition in your trigger.

Wait, so I DONT do the array? But that resets the whole thing. Could you do a step by step with the condition please? :)
 
well, if you want, that if a unit, let's say from player 1, enters your rect, the cinematic starts, and then the cinematic is disabled for all. then use the following trigger. ('No rect' is your rect)
  • Untitled Trigger 002
    • Events
      • Unit - A unit enters No rect
    • Conditions
      • boolean Equal to False
    • Actions
      • Set boolean = True
      • -------- Here your cinematic --------
but if you want, if a unit, doesn't matter of which player, enters your rect, it's disabled for this player, but the others can watch it, then use the following trigger. ('No rect' is your rect)

  • Untitled Trigger 001
    • Events
      • Unit - A unit enters No rect
    • Conditions
      • booleanARRAY[(Player number of (Owner of (Triggering unit)))] Equal to False
    • Actions
      • Set booleanARRAY[(Player number of (Owner of (Triggering unit)))] = True
      • -------- Here your cinematic --------
 
Level 3
Joined
Sep 7, 2009
Messages
22
Aha! Thanks, that's exactly what I was looking for. :thumbs_up:

{EDIT}
Wait... I can't find the condition category. Help please? :(
 
Last edited by a moderator:
Level 37
Joined
Mar 6, 2006
Messages
9,240
Umm..huh?

Right click on Conditions -> select new condition. Select Boolean Comparison. Left click the first blue text. (Triggering unit is a structure). If you have created the array, select it from the variable list. Otherwise click edit variables. Create a boolean type variable, check the "array" box. Click OK, and then OK again. Then select your variable. From there on it should be easy.
 
Level 25
Joined
May 11, 2007
Messages
4,651
Why don't you just copy the trigger, set in condition "Player(Owner of entering unit equals to player 1)
And then in actions you take
Trigger off.
And then just copy the trigger until you have all players done.

If I understood you correct.
 
Status
Not open for further replies.
Top