Greetings all! trying to fix an issue for ultima adventures, and have been hitting my head on a wall for weeks now so i figured id ask the pros here
Here's the issue:
There are items in class called Stealbase (baseaddon) that generate a box (addoncomponent) on it. I'd like for players to be able to use the stealing skill on it.
So when a player uses stealing, and targets the box, ontarget in stealing.cs identifies the target as AddonComponent, not as a stealbase. When i try to cast it as a stealbase i get a server crash
I am trying to call a method in the stealbase class from the addoncomponent, but using
((StealBase)toSteal).DoDamage( m_Thief );
is what is causing the issue. in the above line, toSteal is the addoncomponent.
I uploaded stealbase script to the thread so you can see how the addoncomponent is generated.
Question: how would i call the StealBase.DoDamage method from the OnTarget from stealing?
sorry if i haven't explained property - just trying to be as clear as i can!
Here's the issue:
There are items in class called Stealbase (baseaddon) that generate a box (addoncomponent) on it. I'd like for players to be able to use the stealing skill on it.
So when a player uses stealing, and targets the box, ontarget in stealing.cs identifies the target as AddonComponent, not as a stealbase. When i try to cast it as a stealbase i get a server crash
I am trying to call a method in the stealbase class from the addoncomponent, but using
((StealBase)toSteal).DoDamage( m_Thief );
is what is causing the issue. in the above line, toSteal is the addoncomponent.
I uploaded stealbase script to the thread so you can see how the addoncomponent is generated.
Question: how would i call the StealBase.DoDamage method from the OnTarget from stealing?
sorry if i haven't explained property - just trying to be as clear as i can!