Enjoy the classic broodwar game with improved mechanics, new units, upgrades, abilities, and lot of changes that will improve the gameplay and open new strategies and compositions to fight with.
Posts | ||
---|---|---|
Extended Pick-up Range Source | Locked | |
Thread Options | ||
Apr 5 2016 Anchor | ||
To make this implementation, there are two scenarios we want to analyze: When some of the above happens we want to know if the unit is in the pick up range. When that happens we are ready to proceed with our code. The shuttle will manage the operation, so when a unit its issued to enter a transport and is in the range, we will redirect the order to the transport. What the trasport have to do is the following: Move the target unit to its current position and issue the unit to enter the transport, then we need to stop the trasnport as it want to go to the original position of the unit. Problem is that we cannot use the function scbw::moveUnit() because it prevents units for overlapping positions (even a flying unit and a ground unit) so we need a new function that dont do that. So, i created a new one based on the original function, that dont manage units collisions. So it moves the unit exactly to the same position as the shuttle. Making the pick up order to happen even before we have time to see the unit So first we define the pickup range in definitions.h
Then we add the new function in api.cpp
and the declaration in api.h
And finally we add the code in the nextFrame() function in hook.cpp
And we can also add a circle showing the extended range in hook.cpp in the selection block
Edited by: RavenWolf |
Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.