Grettings chaps,
I want to create a certain mechanic for a unit type. This unit type would be a limited one, with a limit set to 4. How would this mechanic work like:
This unit will have a spell called 'Create a portal', which will create a permament 'portal' at the location of cast. As long as the unit which cast the spell alive, the portal is alive, or unless enemy units simply destroy the portal. (So not a timed portal) Each of the units can create only one portal, meaning if the unit has already created a portal, and casts it again, the previous one is automaticaly destroyed.
That's it about the creating portals. Now moving onto the portals:
The portals would be able to connect with each other and then serving as 'real' portals, allowing players to instantly move units from one portal to another. When portal is created, by default it is 'inactive'. However it has an ability to 'connect' with another portal, thus creating a link between these two, and well, becoming active. Each portal can be connected to only one portal, and each of them can 'change' their destination, so basically disconnect with their current portal and connect with a diffrent one.
I imagine this will probably require hashtables, which I'm really a newbie in. That's why I'm asking you guys for help.
I want to create a certain mechanic for a unit type. This unit type would be a limited one, with a limit set to 4. How would this mechanic work like:
This unit will have a spell called 'Create a portal', which will create a permament 'portal' at the location of cast. As long as the unit which cast the spell alive, the portal is alive, or unless enemy units simply destroy the portal. (So not a timed portal) Each of the units can create only one portal, meaning if the unit has already created a portal, and casts it again, the previous one is automaticaly destroyed.
That's it about the creating portals. Now moving onto the portals:
The portals would be able to connect with each other and then serving as 'real' portals, allowing players to instantly move units from one portal to another. When portal is created, by default it is 'inactive'. However it has an ability to 'connect' with another portal, thus creating a link between these two, and well, becoming active. Each portal can be connected to only one portal, and each of them can 'change' their destination, so basically disconnect with their current portal and connect with a diffrent one.
I imagine this will probably require hashtables, which I'm really a newbie in. That's why I'm asking you guys for help.