fixed turrets

Get help using Construct 2

Post » Tue Sep 24, 2013 9:59 pm

jep use seperate turrets. put them into a family.
B
18
S
6
G
3
Posts: 197
Reputation: 4,129

Post » Tue Sep 24, 2013 10:15 pm

an instance variable allow to have different value for multiple instance of the same object.
it works for group = 1 or 2
it works for the life amount and size of different instance of same object.
i dont know why it doesnt work here.

i figure another way to do it.
i will make something like : if timer shoot is 1, turret shoot avery one second
if timer shoot is 2, turret shoot every 2 second. i think it will work.

but anyway, i would like to have the solution with "shoot every turret.timershoot" second
it would help me for many other problems.
B
19
S
5
Posts: 104
Reputation: 1,761

Post » Wed Sep 25, 2013 1:44 pm

for those who are interested :

i did like that, it works fine.

https://www.dropbox.com/s/m4b9v76hvticwxd/sidegun.jpg

but im still in the 'shoot every turret.timershoot seconds'
possibility if someone know how to do it.

B
19
S
5
Posts: 104
Reputation: 1,761

Post » Wed Sep 25, 2013 1:52 pm

Is group an instance variable? So they are separate objects now then? Because before they were all copies. What's the problem too? I'm not sure I understand from 'shoot every turret.timershoot seconds'. Explain exactly what you want to happen with each group of turrets and when the firerate should change.
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Wed Sep 25, 2013 2:20 pm

he has about 9 instances of the tower. he has set an instance variable timershoot. he want that every tower shoots bullets every timershoot time as soon as he walks on the trigger.
B
18
S
6
G
3
Posts: 197
Reputation: 4,129

Post » Wed Sep 25, 2013 2:34 pm

@yonda    exactly.


i also tried to compare two different instance variable from two different object like :

if turret.group = controller.group

but i couldnt make it work.

so i guess i need to see capx more complicated than what i can do.
B
19
S
5
Posts: 104
Reputation: 1,761

Post » Wed Sep 25, 2013 3:05 pm

You use Every X Seconds and instead of a number enter turret.timershoot.
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Wed Sep 25, 2013 3:18 pm

thats precisely what im asking.
why it doesnt work when i do it.
please show a capx if it seems obvious to you.
B
19
S
5
Posts: 104
Reputation: 1,761

Post » Wed Sep 25, 2013 6:57 pm

[QUOTE=plinkie] You use Every X Seconds and instead of a number enter turret.timershoot.[/QUOTE]

well he already did that, but thats not working as he wishes
B
18
S
6
G
3
Posts: 197
Reputation: 4,129

Previous

Return to How do I....?

Who is online

Users browsing this forum: AndreasR and 19 guests