Jump to content

Quick combat system discussion


ItHadToComeToThis
 Share

You are about to reply to a thread that has been inactive for 1443 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

So, my combat system is coming along nicely and I am currently at the point of adding in the action bar. The flow of logic at the minute is thusly :

Press gesture -> HUD picks up gesture and darkens the texture on the appropriate slot -> HUD sends message to attached attack telling it to start -> the attached attack sends a message to the HUD checking that the player has enough mana and has the correct attack type -> If they do the HUD sends a message back to the attached attack and instructs it to start -> the HUD then activates a cool down timer preventing you from using that slot / attack again until the timer runs out -> Slot lights back up

What I would usually do is also add a cool down timer and use/prevent variable to the attached attack as well. Thus the HUD and the attached attack would both be running some kind of use prevention and cool down timer. But, is this necessary?. It is something I have always done and I am now wondering whether I am just writing needless code if the HUD is already handling the cool down. The only disadvantage to not including it is in theory someone could detach the attack and then re attach it to another slot and use it straight away. However, with the way I have the action slots setup it would be a pain as they would have to detach more than one thing to place it in another slot. The slots do not auto re arrange themselves if you detach something as a player might detach by accident and want their bar setup in a specific way.

What do you think?

Link to comment
Share on other sites

28 minutes ago, Mollymews said:

a use/prevent flag helps the region server by not generating events when a player keeps jamming the HUD with touches, which a lot of players do, specially new players. So if only for this reason I tend to go with use/prevent flags

 

That is already happening in the HUD. The gestures activate through the HUD, the use/prevent flag is activated at that point. I am more thinking from a security point of view whether it is worth having the same use/prevent flags inside of the attacks themselves like I usually would. From my point of view it seems it might not be needed, but asking here what others would do. As I said the only risk I see if people attaching the attack to a different slot but given the slots do not re arrange themselves if one item is detached they would have to detach 2+ items to re attach them at different spots to be able to use the attack before the cool down has happened. Would anyone go to that faff given say a 15 second cool down

Link to comment
Share on other sites

  • 3 months later...

You made the assumption that re-arranging the attachments would be a pain.

However you could automate re-attaching the attacks to stagger an attack to the next slot ready for use.

 

See RLVa for methods on automating attaching and detaching inventory items.

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1443 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...