Author Topic: Hiding parts of a model  (Read 690 times)

Does anyone know for certain if hideNode works on custom models or just the player?

I mounted the model to myself and then I tried
Code: [Select]
==>%armour = findClientByName("Jervan").player.getMountedImage(2); %armour.hideNode("Axe_Wood"); %armour.hideNode("Axe_Metal");and then got this back
Code: [Select]
<input> (0): Unknown command hideNode.
  Object WarmongerSuitImage(1115) WarmongerSuitImage -> ItemImage -> ShapeBaseImageData -> GameBaseData -> SimDataBlock -> SimObject -> SimObject
<input> (0): Unknown command hideNode.

I have other ideas of how to do this so don't be worried about giving the bad news if you're sure. :P
All help appreciated! :)

Assuming from that error, no. However you can type
Code: [Select]
findClientByName("Jervan").player.getMountedImage(2).dump()to get a full list of functions for this object.

Otherwise, you will probably need to create duplicate models with some parts hidden and then switch those out.

Ah, that's quite a nuisance.

I tried the dump and discovered my secondary method probably won't work either, which was to create a drastic animation on the model... but I don't see the playThread function. I wouldn't want to create duplicate models due to the download time for a small novelty, so I guess it's scrapped.

Appreciate the help anyway though, you've probably saved me a lot of time! :)

Yay, I did good.

You're welcome.

getMountedImage returns the ShapeBaseImageData datablock, and not the object itself, which can't be edited outside of the datablock.

You can un/hide nodes on static shapes and player objects (possibly anything of ShapeBaseObject type), but not on mounted images.

getMountedImage returns the ShapeBaseImageData datablock, and not the object itself, which can't be edited outside of the datablock.
So using the datablock is out of the question..
You can un/hide nodes on static shapes and player objects (possibly anything of ShapeBaseObject type), but not on mounted images.
..So can static shapes or player objects be mounted to the player? :D
And if they can, how do you create them?

Player objects, possibly, but it's very hacky and not recommended to turn a player into a weapon. Look at that "Baby Mod" code or something similar where you could put it into your hand.

Static shapes, no or not good - the v0002 "Lego Car" mounted static shapes as bricks for a buildable vehicle but it horridly lagged if you put more than about three on cars in the server.

It's not a weapon, it's armour which has weapons attatched for aesthetics on the model (to be hidden when the actual weapon is drawn)... come to think of it, a Player Object would work pretty well since it could absorb damage and have it's own pain effect. Thanks Space!

Oh. For that, use several mounted images, maybe.

- Right Hand Weapon
- Left Hand Weapon
- Armour
- Holstered weapon A
- Holstered weapon B
...

Split it up into more than one model. Look at TwoGuns for an example of this - the Pistol, Akimbo Pistol, Holstered Pistol and Holstered Akimbo Pistol are each separate shapeBaseImageData datablocks, along with shared particle effects and an item with a few fields.

This was my first option, of course - but I decided to add more visual things than armour and weapons :cookieMonster: