Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / 2D Selection of objects problems

Author
Message
HeavyAmp
17
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 8th Nov 2006 01:22
Hi I am trying to make a basic 2d rts. Ive only just started as you can see and already ive come across a problem that i cant figure out.
I create units using the space key. Then select them using the mouse. Click and drag. For some reason it only shows the objects as selected if all of them are selected at once. You cant have only one object selected. Some help would be good. And also if you have any handy tips for making an rts or about my code please feel free to share it .
HeavyAmp
17
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 8th Nov 2006 01:34
sorry forgot to add the code and it wont let me edit my frst post.

HeavyAmp
17
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 9th Nov 2006 12:54
Ok i figured it out I put the maximum amount of soldiers i could have in the code thats changes the object to selected. So they all got selected at once. It wasn't easy to pick up on because I didn't name my variables very well.
HeavyAmp
17
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 10th Nov 2006 16:03
Ive got a logic operator problem that i cant figure out with the not like command.



The .x and .y is the units current position and the .destx and .desty is where is it is going to. The above code compiles fine but still renders my waypoints if the units have reached there waypoints.




The code above works but i will probably will come across this problem again and want to know how to use the not like command and the else way is a tacky way of doing it.

Login to post a reply

Server time is: 2024-09-25 11:31:10
Your offset time is: 2024-09-25 11:31:10