Author Topic: Toggling appearance of an item?  (Read 637 times)

I want to make an item that changes appearance when you activate it, and changes back when activating it one more time. Can someone post the line of code that makes this possible? I'd like to put animation between the two "transitions", and I use Blender.

You'd probably need to create two images for each state, then set the image using the method that is used for ironsighting weapons.

How do I do that? I'm kinda new to scripting. Can you please post the part of the code that does this?

How do I do that? I'm kinda new to scripting. Can you please post the part of the code that does this?

If you've already created the ShapeBaseImageData datablock for your weapon, just create a second one and call it [NAMEOFYOURWEAPONHERE]number2 or something, then look at the code of any weapon that has ironsighting, then find the actual code that changes the image from one to another.

This is part of the code for Choneis' Yoyo item, is this relevant?
Code: [Select]
   // Initial start up state
stateName[0]                     = "Activate";
stateTimeoutValue[0]             = 0.15;
stateTransitionOnTimeout[0]       = "Ready";
stateSound[0] = weaponSwitchSound;

stateName[1]                     = "Ready";
stateTransitionOnTriggerDown[1]  = "Fire";
stateAllowImageChange[1]         = true;
stateSequence[1] = "Ready";

stateName[3] = "Fire";
stateTimeoutValue[3]            = 1.1;
stateTransitionOnTimeout[3]     = "Reload";
stateSequence[3] = "fire";
stateScript[3] = "OnFire";

stateName[4] = "Reload";
stateSequence[4]                = "Reload";
stateTransitionOnTriggerUp[4]     = "Ready";
stateSequence[4] = "Ready";

};