Jump to content
  • entries
    165
  • comments
    199
  • views
    87,940

Low poly infantry en mass


Flexman

1,173 views

 Share

We finally sourced a a reasonably good infantry soldier, low poly model, rigged, animated and exported. We can fill the screen with dozens of these guys, falling, shooting prone, grenade tossing. We'll give them a couple of weapons they can swap between and a range of helmets swapped in by setting an entity key.

 

screenshot_122.jpg

 

To initially test animation sequences I populated a drop-down control for the editor dialog with the following LUA, chopped up for readability. But lets you pick which frames to loop by name (or number). This is quite compact for AI troops which need to be lightweight in processing terms, this means non-use of character controllers.

 

 

 

class.anim = {

{"Idle",0,49},

{"Stand and Fire",50,89},

{"Running",90,111},

{"Walking",112,147},

{"Grenade Throw",148,187},

{"Take Cover",188,213},

{"Stand to Squat",214,241},

{"Fire from Squat",242,291},

{"Squat to Stand",292,313},

{"Go Prone",314,359},

{"Fire from Prone",360,379},

{"Stand Up",380,425},

{"Death Forwards",426,532},

{"Death Backwards",533,568},

{"Jump",569,614}

}

 

 

function class:InitDialog(grid)

local choices = ""

local total = table.getn(class.anim)

 

 

for i=1,total do

choices = choices .. class.anim[1]

if (i < total) then

choices = choices ..","

end

end

 

 

self.super:InitDialog(grid)

group=grid:AddGroup("Animation")

group:AddProperty("sequence",PROPERTY_CHOICE, choices , "Animation")

group:Expand(1)

end

 

 

 

function object:SetKey(key,value)

if key=="sequence" then

object.framestart = class.anim[value+1][2]

object.frameend = class.anim[value+1][3]

end

return self.super:SetKey(key,value)

end

 

 

screenshot_121.jpg

 

 

 

 

4946580266235927217-4687933262154913685?l=combathelo.blogspot.com

 

Source

 Share

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...