Black-Cell.net

  • December 17, 2018, 01:21:56 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: PurchaseSettingsDefClass  (Read 1731 times)

Reborn

  • Donator
  • Offline Offline
  • Posts: 200
    • View Profile
PurchaseSettingsDefClass
« on: March 18, 2008, 01:26:53 PM »

At various points during a match I need to use Disable_Preset_By_Name, which is basically changing values in PurchaseSettingsDefClass for the specific preset to make it disabled (you know, when you get that "item is not presently available" message, or something like that).
This is working fine. However, I need to re-enable this preset at various points too. Unfortunately there isn't a "Enable_Preset_By_Name" function.
You could argue that it's better to store the info on level_load separately so I can use these value to set the variable back. A sort of original template. However I am only going to want to do this for a few presets, probably just three.
I have that variable values for a preset that I am working with, they are:
[12:19:41] Host: cost is 1750
[12:19:41] Host: stringids is 1419
[12:19:41] Host: presetids is 81930086
The preset name is "Ghost Stalker".
Given this infomation it should be possible to "re-enable" the preset after the "Disable_Preset_By_Name" function has been used on it. Something like a "Enable_Ghost_Stalker" function using the fixed values supplied.
I do not have much experiance, infact none at all with "PurchaseSettingsDefClass", so I am also unsure if you would need to set the cost to twice as much if the power plant is dead, probably I guess.

The thing is, although it should be possible to do this, I seem to keep crashing my server. It's probably something I am doing rather then an inability to re-enable the units. But I am a bit stuck.

If someone would be so kind as to post a function that works, reenabling the unit mention using the variables posted then I would be grateful, I seem to keep messing this up :-/

Hope you can help :-)
Logged

Reborn

  • Donator
  • Offline Offline
  • Posts: 200
    • View Profile
Re: PurchaseSettingsDefClass
« Reply #1 on: March 19, 2008, 02:04:50 AM »

Never mind, i'm pretty sure I have it now :-)
Logged
Pages: [1]   Go Up