1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  4. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  5. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Text Over Unit Help

Discussion in 'Triggers & Scripts' started by iVengeance., Sep 13, 2008.

  1. iVengeance.

    iVengeance.

    Joined:
    Jun 18, 2008
    Messages:
    30
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Allright guys, Im still working on Gates of the Brave ORPG and I would like to implement this sytem into it. Ive seen this in an rpg before... Im pretty sure it was Crusade.
    I want player chat text over unit. Heres the thing I cant figure out:


    • Talk
      • Events
        • Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
        • Player - Player 2 (Blue) types a chat message containing <Empty String> as A substring
        • Player - Player 3 (Teal) types a chat message containing <Empty String> as A substring
        • Player - Player 4 (Purple) types a chat message containing <Empty String> as A substring
        • Player - Player 5 (Yellow) types a chat message containing <Empty String> as A substring
        • Player - Player 6 (Orange) types a chat message containing <Empty String> as A substring
        • Player - Player 7 (Green) types a chat message containing <Empty String> as A substring
        • Player - Player 8 (Pink) types a chat message containing <Empty String> as A substring
      • Conditions
      • Actions
        • Floating Text - Create floating text that reads (((Name of (Triggering player)) + says: ) + (Entered chat string)) above (Last created unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        • Floating Text - Change (Last created floating text): Disable permanence
        • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
        • Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds


    Ok, that seems right to me, but there is one thing that isnt.
    My ORPG does not use taverns for selection of Heroes. It used the LOAP type unit selection. So After a unit enters the region to get his hero, the action "last created unit" is used. Then, once another player gets his hero, it switches that text over to that hero, and since there are 8 players, each of them need to be able to talk over there selected hero.
    Ughh qite mindboggling. :[
     
  2. Fengik

    Fengik

    Joined:
    Mar 12, 2007
    Messages:
    62
    Resources:
    0
    Resources:
    0
    You could assign each hero a variable and use that to see which hero is which, but i think theres several more simple solutions
     
  3. iVengeance.

    iVengeance.

    Joined:
    Jun 18, 2008
    Messages:
    30
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Yeah that seems a bit difficult :[

    They should put the answer to this in the tutorial section :eek:
     
    Last edited: Sep 13, 2008
  4. Mufanza

    Mufanza

    Joined:
    Dec 8, 2006
    Messages:
    331
    Resources:
    4
    Models:
    1
    Skins:
    1
    Maps:
    2
    Resources:
    4
    Just create variable named Hero, type of this variable will be Unit and array will be 12.
    Now, when player choose hero through your "LOAP type unit selection system", just set variable Hero[player number of (playerThatChoosesHero)] to Last Created Unit

    Simple
    Now the action in your trigger will be like
    Floating Text - Create floating text that reads (((Name of (Triggering player)) + says: ) + (Entered chat string)) above (Hero[Player number of(triggering player)]) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency

    Is my post readable by the way?
     
  5. iVengeance.

    iVengeance.

    Joined:
    Jun 18, 2008
    Messages:
    30
    Resources:
    1
    Maps:
    1
    Resources:
    1
    This is a bit hard to understand.
    Do you mean create a variable named selected hero, array 1-12
    then on each of my hero selection triggers,
    now could you explain how I would set each variable to each hero?
    Please and thanks :D

    EDIT: Will give rep for answer
     
  6. Soga-

    Soga-

    Joined:
    Jul 20, 2008
    Messages:
    374
    Resources:
    0
    Resources:
    0
    My, my. It's been a while since I last posted here.

    How much about variables do you know?
     
  7. zandose

    zandose

    Joined:
    Sep 13, 2008
    Messages:
    64
    Resources:
    0
    Resources:
    0
    • Untitled Trigger 002
      • Events
      • Conditions
      • Actions
        • Set Heroes[(Player number of (Triggering player))] = (Last created unit)

    • Untitled Trigger 001
      • Events
        • Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
      • Conditions
      • Actions
        • -------- Heroes is a unit variable with a array of 12 --------
        • Floating Text - Create floating text that reads (Entered chat string) above Heroes[(Player number of (Triggering player))] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        • -------- You know the rest... --------