Dealing with unique Sprites.

For questions about using Classic.

Post » Wed Aug 12, 2009 4:17 pm

[quote="QuaziGNRLnose":3l326m3v]
if your event was lets say: red collides with blue. (sprite2 hits sprite or vice versa)

it will pick the affected sprite in family blue and the affected sprite in family red. and choose the variables for damage associated to those sprites.[/quote:3l326m3v]
B
73
S
13
G
8
Posts: 1,972
Reputation: 9,791

Post » Mon Aug 17, 2009 2:39 am

I'm working on the families and I want to get some confirmation on third events I made, as the only way I can see them being possible is heavy in jerry-rigging.


basically how it works currently is (units is the family)

first event:click on the attacker and it gathers the power and accuracy information as well as x and y position. as well as sets its pv "active" to 1

second:click on the target takes the information from him and calculates damage and hit chance. and sets the "ready" global value to 1.

third:constantly check's if there's a unit with active to 1 and the ready global value is 1. once both are 1 it sets the attacker unit's angle and fires the shot.

This seems highly inefficient and I suspect there's an easier way.

If not there should be, Like sprite variables/groups or something. something that you can identify a specific sprite for further reference without having to constantly reference it with some random variable.

Something like:

first event:click on the attacker and it gathers the power and accuracy information as well as x and y position. as well as sets its pv "active" to 1. Identify the attacker.

second:click on the target takes the information from him and calculates damage and hit chance. and sets the "ready" global value to 1. sets the attacker unit's angle and fires the shot.

thanks for the help.
B
2
S
1
G
3
Posts: 16
Reputation: 1,032

Post » Mon Aug 17, 2009 6:18 am

the object pairer can do stuff like this
if I'm understanding you correctly
i'm about to leave for work
but if you search the forums you can see some examples of how it works
Spriter Dev
B
97
S
21
G
12
Posts: 3,259
Reputation: 16,844

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests