Results 1 to 10 of 599

Thread: SAPP

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11

    Code Gephyrophobia Dogfight

    Because I've written this three times now, I'm pasting this here so I don't lose it again. It's a banshee dogfight game script, best played on gephyrophobia with reverse tag.

    events.txt:
    Code:
    event_start $mode:Dogfight $map:Gephyrophobia 'cheat_jetpack 1'event_spawn $mode:Dogfight 't $n spawn$rand;w8 1;spawn vehi vehicles\banshee\banshee_mp $n;venter $n'
    event_die $mode:Dogfight 'w8 3;vdel $n'
    event_alive $mode:Dogfight $z<=-32 'say $n "Out of Bounds, penalized 50% health";m $n 0 0 10;hp $n /2;spawn vehi vehicles\banshee\banshee_mp $n;venter $n'
    locations.txt:
    Code:
    gephyrophobia:spawn1:58 -120 -6
    gephyrophobia:spawn2:58 -90 -6
    gephyrophobia:spawn3:58 -60 -6
    gephyrophobia:spawn4:58 -30 -6
    gephyrophobia:spawn5:58 -120 -5
    gephyrophobia:spawn6:58 -90 -5
    gephyrophobia:spawn7:58 -60 -5
    gephyrophobia:spawn8:58 -30 -5
    gephyrophobia:spawn9:-5 -120 -6
    gephyrophobia:spawn10:-5 -90 -6
    gephyrophobia:spawn11:-5 -60 -6
    gephyrophobia:spawn12:-5 -30 -6
    gephyrophobia:spawn13:-5 -120 -5
    gephyrophobia:spawn14:-5 -90 -5
    gephyrophobia:spawn15:-5 -60 -5
    gephyrophobia:spawn16:-5 -30 -5
    Edit:
    Also, pleeaase look into custom variables so I don't have to do things with opensauce like this
    Code:
    event_spawn $team:red 'if (not (and (!= (runtime_integer_get 20) 0) (!= (runtime_integer_get 21) 0) (!= (runtime_integer_get 22) 0) true)) (begin (runtime_integer_set 20 (* (object_data_get_real (unit (list_get (players) (- $n 1))) "position" "x") 100)) (runtime_integer_set 21 (* (object_data_get_real (unit (list_get (players) (- $n 1))) "position" "y") 100)) (runtime_integer_set 22 (* (object_data_get_real (unit (list_get (players) (- $n 1))) "position" "z") 100)));object_data_set_real (unit (list_get (players) (- $n 1))) "position" "x" (/ (runtime_integer_get 20) 100);object_data_set_real (unit (list_get (players) (- $n 1))) "position" "y" (/ (runtime_integer_get 21) 100);object_data_set_real (unit (list_get (players) (- $n 1))) "position" "z" (/ (runtime_integer_get 22) 100)'
    Didn't actually work, but certain operations do, as long as they take integers. I tried at one point to use players' shields as temporary storage, which actually almost worked, but the runtime_integer commands don't like receiving floats back. Also opensauce breaks the start event, so it renders most things useless anyways.
    Last edited by SonicXP; May 8th, 2014 at 07:47 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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