Hi there
I am slightly confused about the example given of Pickup components.
It showed how there is a VApply which should do whatever it needs to be done, such as adding health to the player. But it never mentioned when the VApply should run or to be more precise, how to manage picking up the health pack actor.
In some games I can imagine it being easy as overloading the pickup interface's VUpdate function to see if the player is in "pickup radius" and then VApply, as well as maybe call a "destroy" event on the actor as it should disappear after picked up.
How would you go on games where you use a button to use/pickup objects as in most games now? Will the VUpdate be useless? Will the use function, if targets the pickup-actor have to try and GetComponent(pickup component id) and if it exists VApply it to itself?
Now generally reading the book feels lacking and probably needs the source code, ComponentId is mentioned a lot but never what it is (unsigned int? HashedString as with GCC3?)
I feel chapter 6 was pretty lacking on examples, say how do you manage hit points? Is it its own component? how do you edit it or react to editing it via combat. I tried to find information in chapter 21 but it felt missing there too.
I am slightly confused about the example given of Pickup components.
It showed how there is a VApply which should do whatever it needs to be done, such as adding health to the player. But it never mentioned when the VApply should run or to be more precise, how to manage picking up the health pack actor.
In some games I can imagine it being easy as overloading the pickup interface's VUpdate function to see if the player is in "pickup radius" and then VApply, as well as maybe call a "destroy" event on the actor as it should disappear after picked up.
How would you go on games where you use a button to use/pickup objects as in most games now? Will the VUpdate be useless? Will the use function, if targets the pickup-actor have to try and GetComponent(pickup component id) and if it exists VApply it to itself?
Now generally reading the book feels lacking and probably needs the source code, ComponentId is mentioned a lot but never what it is (unsigned int? HashedString as with GCC3?)
I feel chapter 6 was pretty lacking on examples, say how do you manage hit points? Is it its own component? how do you edit it or react to editing it via combat. I tried to find information in chapter 21 but it felt missing there too.
The post was edited 1 time, last by Shanee ().