Blockland Forums > Modification Help
Would it be possible to script...
(1/5) > >>
Midway Sentinel:
Would it be possible to script a weapon for when the toolAmmo reaches a certain level that you could make it set the weaponImage shapeFile to another model?

like this:


--- Code: ---function weaponImage::onModelChangeCheck(%this,%obj,%slot)
{
   if(%obj.toolAmmo[%obj.currTool] <= 15)
   %obj.setShapeFile = "./secondWeaponModel.dts";
}
--- End code ---
?
Chrono:
You can't change the shape file, but you can mount another weapon with a different shape file.
Midway Sentinel:
would it change the amount of ammo in the weapon? or would you have to set the ammo for each?
indyjones:
You could do it like the hands on model approach.

Have the model and when you reach the certain amount of ammo you want (negative/ positive) make the model invisible and make the other appear.  It's really hard to explain, but it's like the model item that you pick up is different than the one you are holding.  The L4D2 wepset is a good example.
Extrude:

--- Quote from: indyjones on August 15, 2011, 03:24:46 PM ---You could do it like the hands on model approach.

Have the model and when you reach the certain amount of ammo you want (negative/ positive) make the model invisible and make the other appear.  It's really hard to explain, but it's like the model item that you pick up is different than the one you are holding.  The L4D2 wepset is a good example.

--- End quote ---
The weapon item datablock is different from the weapon image datablock. That's how that works.

Also, this can be done pretty easily with multiple images, like Chrono said.
Navigation
Message Index
Next page

Go to full version