Bullets, and the accuracy of.

For questions about using Classic.

Post » Sun Apr 04, 2010 11:40 pm

In my side scrolling shooter I am attempting to change the object, a bullet object's, accuracy at runtime. It isn't working. I think I know why, but I am not sure. I am trying to change it based on the speed of the mouse's movement. I know this is working correctly as I am using it for the cross hair. I attempted to change the bullet accuracy to something other than a number, a variable for example, and it changed back. I am going to go run some more tests. The cap link is below, I hate to be paranoid, but please don't steal any of my half assed artworks.

http://www.megaupload.com/?d=CJ7ATNME

Any help is appreciated.
B
2
G
3
Posts: 46
Reputation: 942

Post » Mon Apr 05, 2010 2:55 am

Sorry for double post, however this may be of use for those of you who wish to assist.
It seems that the accuracy is "right" but the bullets don't appear to spread correctly with it.

Wait, that gives me an idea....

Edit:
I tried setting the accuracy when the bullet is spawned too, did not work.
B
2
G
3
Posts: 46
Reputation: 942

Post » Wed Apr 07, 2010 4:56 am

I don't have time to look at your cap right now, but have you tried the bullet template/tutorial that comes with construct.

it's under file> new from template (I think) >(one of the files in there).
Sorry, but I don't have construct open right now...

:D
B
2
S
1
G
4
Posts: 156
Reputation: 1,612

Post » Fri Apr 09, 2010 12:27 pm

I think it works, you just do not see the effects cause there are a lot of movement and slugs.

I have changed in your cap the accuracy calculating to "(Sprite.Value('accuracy') + Chair.value('modifier') )* Chair.Value('speed')"

and attached the action to the spawn moment of the Slug.

Now, you can test like this:
Do not move the cursor: the bullets are fired in one straight line
Move the cursor next to the soldier and then fire it while moving only vertical. You will see the slugs disperse more.

You will only have to set the weighting for the speed modifier.
B
2
G
2
Posts: 23
Reputation: 696

Post » Sat Apr 10, 2010 1:22 am

I appreciate the help, but I tried the same thing to test it. It doesnt seem to work right. The bullets do not seem to spread any more...
B
2
G
3
Posts: 46
Reputation: 942

Post » Sat Apr 10, 2010 9:56 am

Here is my modified cap: http://www.box.net/shared/qkv76sc59c

The '0.9' is the weight of the speed and its impact on the accuracy. Normally I used 0.4 as it looked good and quite 'relisticly' but for your need to observe the effect I upped it. '+5' will give the minimum spread if the speed is close to 0.
B
2
G
2
Posts: 23
Reputation: 696

Post » Sun Apr 11, 2010 4:46 am

Wow. Thanks, I really appreciate the help.
B
2
G
3
Posts: 46
Reputation: 942


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests