| Blockland Forums > Modification Help |
| Alternative Fuels |
| (1/2) > >> |
| Deathwishez:
The title here is a rather ban pun. However, I do need help with create an alternative energy variable. Basically, I'm using the current energy bar for something else, but I still need to use energy for other purposes. Seeing as datablocks use energy by default, I'm presented with a problem. I'm not going to make a seperate GUI for this, as that defeats the purpose of me doing this. The alternative energy variable will not need to be displayed. How would I go about doing this? In other words, how can I make variables, such as runEnergyDrain, use a variable of my own, rather than the default energy variable. |
| lordician:
Wouldn't a simple variable do enough then? |
| Deathwishez:
Of course, that's what I'm using. I just don't know how to tell the player datablock to use that variable as opposed to the energy variable. |
| lordician:
--- Quote from: Deathwishez on December 25, 2010, 03:35:53 PM ---Of course, that's what I'm using. I just don't know how to tell the player datablock to use that variable as opposed to the energy variable. --- End quote --- You can't tell the datablock directly. You have to make functions that update and/or set the variable on a specific value. Like if you want to make it so that if you press jet you will rain energy from the variable, you will have to find a way to update your variable everytime the jet function is used. You can't just say:"Hey, you are going to use some variable i just made." You have to let him know how. The energy is allready there an alternative energy would require an alternative method to work with it. Get it? |
| Deathwishez:
Yes, I do, and have. My question is what is that alternative method? I'll be using runEnergyDrain, jumpEnergyDrain, minRunEnergy, and rechargeRate. |
| Navigation |
| Message Index |
| Next page |