User Tag List

Results 1 to 8 of 8

Thread: Map editor 'triggers'

  1. #1
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Map editor 'triggers'

    Hi, I'm making a map editor for one of my games and I want to have triggers in the game, similar to the ones in Starcraft. The 'actions' I have no problem with, It's just the 'conditions' that I have no idea how to work (and I am really not in the mood for programming in every single combination).

    The conditions I have in mind are:
    -Player Dies(player#)
    -Unit fires a shot(unit id)
    -every (time)
    -elapsed time (time)
    -Unit enters location (location)
    -Unit leaves location (location)
    -While unit is in location (location, loop time)
    -Unit Enters vehicle (vehicle type)
    -Unit leaves vehicle (vehicle type)
    -Unit dies (unit id)
    -Countdown timer (time remaining)
    -Variable Comparison (variable, operator, value)
    -Text message entered()
    -Specific text message entered(text, substring or exact)
    -Movie playing?(yes/no)
    -In cutscene mode.

    There will probably be plenty more where that came from.

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeň, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Map editor 'triggers'

    I'd recomend that you use Lua object for this... When a trigger is set, add that trigger to an array... On a unit dies evetn that could look like this (lines beginning with -- are comments)

    Code:
    --lua
    --To add a unit
    TriggerArray_UnitDies[id] = true
    
    --To remove a value
    TriggerArray_UnitDies[id] = nil
    Then when a unit dies, send a function call with its id as an argument

    Code:
    UnitDies(unitID)
    the function would look like this...

    Code:
    function UnitDies(ID)
      If (TriggerArray_UnitDies[ID] ~= nil) then
        --Do your action here...
      end
    end
    This is only really basic but hopefully it will give you some ideas...

    If this sounds interesting feel free to contact me via msn if you need more help...

  3. #3
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Map editor 'triggers'

    Would this method work for multiple conditions?

  4. #4
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeň, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Map editor 'triggers'

    I suppose it could... The choice is yours... What you are talking about... (Unit Dies, Player Dies, etc) are really triggers, not conditions...

    EDIT: Sry.. mean events not triggers...

  5. #5
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Map editor 'triggers'

    Compare to variable, countdown time remaining, and elapsed time are not events...

  6. #6
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeň, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Map editor 'triggers'

    No... thoose are'nt.. but many of the others were... at least according to how I would do it...

  7. #7
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Map editor 'triggers'

    Yea... They have that wierd 'events are triggers' thing in Starcraft where they just have the 'event' as every 2 seconds.

  8. #8
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeň, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Map editor 'triggers'

    Ok.. have'nt worked with that editor in years.. xD

Similar Threads

  1. How to assign Xbox 360 controller triggers
    By J3sseM in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 19th December 2013, 11:39 PM
  2. [bug rc7] Multiple Touch 0 has ended ALWAYS triggers!
    By StingRay in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 29th March 2013, 05:23 AM
  3. Platformer AI: Triggers not responding sometimes
    By willy in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th July 2011, 09:27 PM
  4. Xbox 360 Triggers and D-Pad
    By Sumo in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 1st February 2010, 06:50 PM
  5. The events triggers at the same time
    By Attan in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 25th September 2007, 04:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •