Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411196 Posts in 69314 Topics- by 58380 Members - Latest Member: feakk

March 18, 2024, 08:10:31 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperPlaytestingMAST-Programming space battlebots! New Video!
Pages: [1]
Print
Author Topic: MAST-Programming space battlebots! New Video!  (Read 1406 times)
Landshark RAWR
Level 10
*****



View Profile
« on: March 11, 2015, 06:44:57 PM »

Mast has been recently updated with multiplayer and some new parts!

Mast is a game about designing a spacecraft to fight and be the strongest



Get the latest version here
http://propslam.com/mast/

here is a video to provide an overview of what the game is in it's current state




A tutorial and gameplay video by youtuber Renjestoo




if you want to share a ship you made you can find the files in MAST/MAST_Data_Ships saved as [shipName].json and [shipName].lua
(this means you can edit your lua with an external program if you wish)

MAST is being programmed by three of my friends with me doing the art


Emails regarding MAST should be directed to [email protected]

I look forward to seeing what everyone makes!
« Last Edit: April 13, 2015, 01:46:33 PM by Landshark RAWR » Logged

Quaqster
TIGBaby
*


View Profile
« Reply #1 on: April 03, 2015, 05:30:29 PM »

Hi there,

I am trying out the game. And I must say... even for a Beginner LUA scripter this is rather easy.

BUT..... I don't really know how to use the GPS in the game. I can't find a example for it.

Can you check If my script is correct?
the logs keep saying:

test.lua:5: function arguments expected near 'local'
  at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0

  at NLua.Lua.DoFile (System.String fileName) [0x00000] in <filename unknown>:0

  at ShipContainer.Start () [0x00000] in <filename unknown>:0

please tell me what I am doing wrong here.
Here is the complete script:

local left = false

function Update()
   local vel = gyro:angVel
   local locate = gps:Pos()
   if ranger:Range() > 0 then
      lbthr:SetThrust(locate, vel)
      rsthr:SetThrust(locate, vel)
      rbthr:SetThrust(-locate, vel)
      lsthr:SetThrust(-locate, vel)
      
      gun:Fire()
      
      if vel > 0 then
         left = false
      else
         left = true
      end
   local search = left and 45 or -45
   
   lbthr:SetThrust(search - locate)
   rsthr:SetThrust(search - locate)
   rbthr:SetThrust(locate - search)
   lsthr:SetThrust(locate - search)
   end   
end


Kind regards,
Quaqster
Logged
Landshark RAWR
Level 10
*****



View Profile
« Reply #2 on: April 03, 2015, 06:17:05 PM »

immediately under your function Update() you have: local vel = gyro:angVel

You're missing the parenthesis and have the wrong capitalization so it should be: gyro:AngVel()

it's pretty easy to miss

Soon we're putting out a new build with a bunch of new features, namely multiplayer better physics! so keep an eye out
Logged

Landshark RAWR
Level 10
*****



View Profile
« Reply #3 on: April 10, 2015, 06:28:31 PM »

Mast has been updated with Multiplayer! local testing pits you against your own ships, i recommend making a dummy ship to help with testing. when you go to Start Battle from the main menu you will pick three ships(they can all be the same ship) to be your team. once your team is set anyone will be able to fight your ships and you will continue to be ranked!
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic