Random mshes for units [Solved]
Moderator: Moderators
-
ARCTroopaNate
- Jedi

- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Random mshes for units [Solved]
Looked through a bunch of topics, searched and everything and I couldn't find anything on giving units random mshes. (Maybe my eyes are just tired after staring at a a screen for the past 16 hours)
I know I've seen it on gametoast and on mods and stuff, and if anyone could point me to a tutorial or help me add them it'd be greatly appreciated.
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
-
ARCTroopaNate
- Jedi

- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: Random mshes for units
My unit doesn't change models. The map doesn't crash or anything but my unit stays the same the entire match. I didn't get any related munge or debug errors. I think I'm missing something...
Meh lua
Meh lua
Hidden/Spoiler:
-
Noobasaurus
- Droid Pilot Assassin

- Posts: 2006
- Joined: Tue Aug 17, 2010 5:56 pm
Re: Random mshes for units
Not sure if "timeout" should be "skintimer" instead, but I'm fairly sure "timeout" is just the name they wanted it to have.skintimer = CreateTimer("timeout")
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Random mshes for units
You need to start the timer once outside the OnTimerElapse function, otherwise it doesn't start the chain.
-
ARCTroopaNate
- Jedi

- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: Random mshes for units
Sorry for me being stupid, I've never worked with timers before. How do you start the timer outside the OnTimerElapse?
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Random mshes for units
You missed the last line of executable code in my example, it was between a couple chunks of comments.ARCTroopaNate wrote:Sorry for me being stupid, I've never worked with timers before. How do you start the timer outside the OnTimerElapse?
this part
Hidden/Spoiler:
-
ARCTroopaNate
- Jedi

- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: Random mshes for units
Like this? Or does it go after the last end.
Hidden/Spoiler:
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Random mshes for units
That should work.
-
ARCTroopaNate
- Jedi

- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: Random mshes for units
When the game tries to change the mshes in my map it crashes and I get this in my log. The msh is there. Is there anything I have to edit in the units odf to get this to work?
Hidden/Spoiler:
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Random mshes for units
Is rep_inf_greytroper being munged into the .lvl? It has to either be loaded in a unit's odf or explicitly by a .req.
Another thing, the code should work how it is, but you have 8 if statements for selecting skins, 4 for rifleman, 4 for pilot. The code would run a little more efficiently if they were combined like this
instead of this
Another thing, the code should work how it is, but you have 8 if statements for selecting skins, 4 for rifleman, 4 for pilot. The code would run a little more efficiently if they were combined like this
Hidden/Spoiler:
Hidden/Spoiler:
-
ARCTroopaNate
- Jedi

- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: Random mshes for units
How would you load it into a Req separately?
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Random mshes for units
Code: Select all
ucft
{
REQN
{
"model"
"rep_inf_greytroper"
"rep_inf_greytroper_low1"
}
}-
ARCTroopaNate
- Jedi

- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: Random mshes for units
Cool! Thanks.
EDIT: Sorry for all the questions...
would I also have to load the models into the side req?
EDIT2: Still not working.
Team Req
Added all the individual msh reqs as you asked.
Lua.
EDIT: Sorry for all the questions...
EDIT2: Still not working.
Team Req
Hidden/Spoiler:
Lua.
Hidden/Spoiler:
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Random mshes for units
your req is looking for other req's instead of msh's with the "lvl" section, not a "model" section.
-
ARCTroopaNate
- Jedi

- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: Random mshes for units
OOOOOOOH...
Is it like dis?
Is it like dis?
Hidden/Spoiler:
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Random mshes for units
almost. only one ucft section
Hidden/Spoiler:
-
ARCTroopaNate
- Jedi

- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: Random mshes for units
YES! It works! Thanks so much Kinetos!
:clone:
