Home Technical Talk

Temporary invisibilization

Mooseboy
polycounter lvl 18
Offline / Send Message
Mooseboy polycounter lvl 18
I want to hide my model's weapon during one of the taunt animations in order to make the weapon hand available for something else. I tried "MyPawn.Weapon.ClientState = WS_Hidden;" when my animation started, but that doesn't work. UT immediately complains as follows:

Log: AssaultRifle ClientState was WRONG! (1)

Does anyone know how to hide the weapon?

Replies

  • KDR_11k
    Offline / Send Message
    KDR_11k polycounter lvl 18
    Let the character throw it into the air? Make him holster it?
  • Mooseboy
    Offline / Send Message
    Mooseboy polycounter lvl 18
    How would you do any of those things? I can imagine that you could maybe change the weapon's attach point to another bone, say the hip, and make it look like you're holstering, but I've not looked into it. Try that with the avril - that'd look pretty amusing.

    What happens in the engine when you change weapons? Somehow it makes gun A go away and replaces it with gun B. But can you make it so you're holding no weapons at all? All I really want is to have the gun not be visible for the duration of a novelty taunt animation.
  • KDR_11k
    Offline / Send Message
    KDR_11k polycounter lvl 18
    I think it destroys the gun actor and spawns a different gun actor in its place when you change weapons. Sorry, there's no way short of coding to remove the weapon and coding will break netgame compatibility. Your best bet is to use constraints to simulate reparenting the gun to something else (maybe throw it on the ground or something). You could maybe move the weapon 10 kilometres underground or something...
  • Mooseboy
    Offline / Send Message
    Mooseboy polycounter lvl 18
    Putting the weapon bone underground is actually a pretty neat idea.

    As for coding an netgame compatibility, what kind of coding are you talking about that will cause problems?
    <ul type="square">[*] I know that Farnsworth has some code to deal with the chair effect and gun placement issues, both of which are handled by classes that attach to the player model, but as far as I know it's capable of running on a net game. If it is a net-capable model, then that means some kinds of code don't prevent use in a network game.
    [*] The model I'm working on has a boatload of code in an attached class as well, and though I have no delusions that it will become a popular model, I would like it to be net-capable.
    [/list]
  • KDR_11k
    Offline / Send Message
    KDR_11k polycounter lvl 18
    I think Farnsworth has a custom species which won't work over the net. Since the species is the only way to plug code into your model I think you can forget about netgame compatibility. If a species file the server lacks is referenced anywhere in any UPL you have on your system the server will throw you out.
  • Mooseboy
    Offline / Send Message
    Mooseboy polycounter lvl 18
    It does have a species, as does mine.

    I think I'm fuzzy on terminology. I thought "netgame" implied that all the model's files existed on the server and the client machines. I've been working under the assumption that the only things that can be included in a session are those which live on the server. I know that in UT99 missing mod and map parts are pushed to the client, but I don't remember what happens with models. What I want to do is avoid adding code that would break rules under those circumstances.

    (I have dialup, so I don't actually play online.)
  • KDR_11k
    Offline / Send Message
    KDR_11k polycounter lvl 18
    Species files are different. When you have a species file on the client and not on the server (the most likely situation) you'll get kicked with "incompatible game version". It's all good when the server has and the client hasn't but the other way around will prevent you from joining. AFAIK nothing else short of modifying the game's original files will cause that error.
Sign In or Register to comment.