S
S
Soldier Programmer2019-03-22 20:43:20
Python
Soldier Programmer, 2019-03-22 20:43:20

Pygame rectangle to highlight units?

I am writing a strategy and I want that when you click on the LMB, a rectangle will start to be drawn that will interact with units (sprites that will change color when they intersect with the rectangle), and also that the rectangle that is drawn changes its width and length. Thanks in advance to those who answer.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
R
rPman, 2019-03-23
@rPman

The rectangle for selecting units is the same unit as the others, well, almost ;) the interaction is virtual, knowing the coordinates of the rectangle and units, you can calculate which ones are under it and select them (your choice, either by adding another selection unit to the scene for each or changing the property of the units is selected and let them be able to change their appearance (showing that they are selected).

T
TyzhSysAdmin, 2016-12-14
@denicv

F8 on boot -> disable reboot on failures (or something like that)
In general, offhand:
1. Damaged system files
2. Really bad screw
3. Reset BIOS settings and replaced IDE mode of sata ports turned on AHCI (or vice versa)
4. Virus.
PS I bet on point 3

M
Mikhail Pogosyan, 2016-12-14
@smile1989

If you perform a check disk, (chkdsk), then do not forget to specify the "/ f" key, but it's best to do this: chkdsk / f / r
but such a check will take a long time. it all depends on the size and condition of the screw. If Windows copes with a hard disk error, then you're lucky, if not, it's better to put more serious utilities into battle, for example, Victoria. and best of all, save all the data, kill the disk with an acronis, initialize and re-create the screw partitions. Should help) Good luck

P
Puma Thailand, 2016-12-14
@opium

you can probably make a backup and get rid of the broken disk

A
Alexander Alexander, 2016-12-14
@VinnyPuhRUS

chkdsk check for errors if there is a fix, after that it will most likely boot, will not help clone it to a working disk

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question