GrangerHub / tremulous

Other
81 stars 18 forks source link

Game Lua, Unit testing, CmdParser, Polymorphic VM interface #84

Open wtfbbqhax opened 6 years ago

wtfbbqhax commented 6 years ago

Demo's of Lua from console

Setting a rotation to the Reactor

Script

reactor = game.gentity_t.find(nil, 'team_human_reactor')
reactor:set_rotation(0, 360, 0)

Demo

https://www.youtube.com/watch?v=6l1MsDs7YyQ

Moving Reactor to a different location

Script

-- This script moves the Reactor into the position of an Acid tube.

reactor = game.gentity_t.find(nil, 'team_human_reactor')

ent = game.gentity_t.find(nil, 'team_alien_acid_tube')
ent.health = 0
ent.die(ent, ent, ent, 100, 0)

reactor.origin = ent.origin

reactor:link_entity()

Demo

https://www.youtube.com/watch?v=lM3b81REEPE