Jump to content

Welcome to Omni-bot Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

Omnibots Won't Use Elevator

- - - - -

  • Please log in to reply
6 replies to this topic

#1
buckwild

buckwild

    Newbie

  • Members
  • Pip
  • 8 posts

I waypointed into an elevator in Enemy Territory on 2 floors, Connected waypoints in both floors.

I added flag: door to activate elevator.

Bidirectional connections lead into elevator but bots won't enter...

ET map is antarctic_base

https://youtu.be/8SGYcJbcyaA



#2
palota

palota

    Senior Member

  • Administrators
  • 543 posts

You must write a gm script for the elevator. You can use Paththrough_UseSwitch



#3
buckwild

buckwild

    Newbie

  • Members
  • Pip
  • 8 posts

The elevator door in antarctic_base 2nd floor is open,
You +activate ingame to move down to first floor(door closes).
Door opens right away below(I added facing to exit), Door closes after a few Seconds and
Elevator returns...
So, I added one-directional connection going down elevator,
A waypoint in top elevator with:
waypoint_setproperty paththrough UseSwitch_PT:elevator
I need bots to +activate in elevator: I added flag: door.
I'm using script in antarctic_base_goals.gm:
 
Map =
 {
     Door1Status = 0, //door is closed initially
     Switches =
     {
         door1 =
         {
             Enabled = true,
             Priority = 0, //always set to 0 when using path through
             WaypointName = "door_1switch",
             Timeout = 2000,
             AimPosition = Vec3(3826.125, -6926.589, 622.895), // Optional 0.8x only, use /bot aim_pos to get aim vector. Replaces the unreliable waypoint facing.
             Wait = function() // optional. used to have the bot wait a bit for slow moving doors / elevators
             {
                 if ( Map.Door1Status == 1 )
                 {
                     //wait 1.5 secs while the door opens
                     sleep(1.5);
                     return true;
                 }
                 //always return false unless the door is open:
                 return false;
             },
         },
     },
 };

 Door1_Moving = function ( trigger )
 {
     if ( trigger.Action == "opening" )
     {
         Map.Door1Status = 1; //open
         Map.Switches.door1.Enabled = false;
         //print("door is opening");
     }
     else
     {
         Map.Door1Status = 0; //closed
         Map.Switches.door1.Enabled = true;
     }
 },

Works well except most bots don't +activate to lower elevator,
They exit...

 



#4
palota

palota

    Senior Member

  • Administrators
  • 543 posts

I know it's difficult, but you should read all wiki pages about scripting and try to learn at least the functions OnMapLoad, OnTrigger and SetAvailableMapGoals. The game is unplayable if bots don't have any goals.

If you attach here your waypoints files, I could help you with the elevator.



#5
buckwild

buckwild

    Newbie

  • Members
  • Pip
  • 8 posts

We're getting help from 'wolfie'.

He fixed elevator, Made tank escort and other goals...



#6
palota

palota

    Senior Member

  • Administrators
  • 543 posts

What version of Omni-bot do you use ? Current version is 0.86.

I have already fixed the elevator and uploaded my waypoints to SVN repository in folder et/incomplete_navs/with_script.



#7
buckwild

buckwild

    Newbie

  • Members
  • Pip
  • 8 posts

Thank You!

I use Omnibot 0.8 2 with dev menu to make map and goals.gm.

I'll try 0.86, Someone showed me https://www.youtube....OmniWiki/videos






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users