• 2 problems with my model
    12 replies, posted
  • Avatar of The Best
  • I have 2 problems with my model, first of all, it's a player model, and the first problem is that I am able to see it in the player model selection menu, but when I select it, my model doesn't change to it. I have to run a lua command in the console for it to work properly. Next, how can I skin it? I've applied only a basic material onto it, my model is a cactus that is supposed to look rather similar to cactuar in terms of it's textures, so it's sorta cartoony. However, my hand-drawn skins in Photoshop look outright horrible, so I was wondering how do /you/ do it?
  • Avatar of Silver Spirit
  • It doesn't automatically switch your model when you click it you have to select it then kill yourself for it to change (or do what you did). Also have you got a screenshot of it? so I can see what your on about.
  • Avatar of Silver Spirit
  • [QUOTE=The Best;16626331]I have killed myself. No dice.[/QUOTE] Not sure whats up with that. [QUOTE=The Best;16626331]The unwrap or the model?[/QUOTE] Either or both (probberly both, then I can see what it looks like in both ways).
  • Avatar of The Best
  • Isn't there supposed to be a lua file that sets your model in the player selection menu? I might have typed wrong.
  • Avatar of Silver Spirit
  • are you not even selecting it from the menu, I thought from what you said you were. [code] if ( SERVER ) then player_manager.AddValidModel( "Name", "models/Name.mdl" ); AddCSLuaFile( 'assassin.lua' ) ; end list.Set( "PlayerOptionsModel", "Name", "models/Name.mdl" ); [/code] Should look exactly like that with Name subsituted with the name of your model.
  • Avatar of The Best
  • I selected it from the menu, killed myself, my model didn't change. Also, thanks.
  • Avatar of smallfry
  • I think your problem is that player_manager.AddValidModel() isn't being run during a singleplayer game. The problem should go away when you set "maxplayers" to something higher than 1, then load a map. If it doesn't, then I'm wrong. Try changing the first line of Silver Spirit's script to this: [lua] if ( SERVER ) or ( SinglePlayer() ) then [/lua] By the way, semicolons are unnecessary and are ignored by GMod Lua.
  • Avatar of Silver Spirit
  • All I put up there is the basic script I use when applying a player model to the list (which is taken from many ones i've downloaded). Didn't know about the semicolon thing at all :) The player_manager.AddValidModel() is on all the playermodel lua scripts i've got and theres no issues with it being there (though even with my limited lua knowledge I didn't think that line made any sense being there).
  • Avatar of The Best
  • Didn't work... even if I add "if ( SERVER ) or ( SinglePlayer() ) then". Here's what I have so far. [code]if ( SERVER ) or ( SinglePlayer() ) then player_manager.AddValidModel( "cactus", "models/player/cactus.mdl" ) AddCSLuaFile( "autorun/cactus.lua" ) end list.Set( "PlayerOptionsModel", "Cactus", "models/player/cactus.mdl" )[/code]
  • Avatar of Omolong
  • Change it to: [lua]player_manager.AddValidModel( "Cactus", "models/player/cactus.mdl" ) list.Set( "PlayerOptionsModel", "Cactus", "models/player/cactus.mdl" )[/lua] And make sure the file is called something like cactus_player_model.lua.
  • Avatar of Omolong
  • Well, there was "cactus" and "Cactus", which conflict and have to be the same to work. And all the other stuff you had in there was useless.