Posts: 844
Threads: 32
Joined: Apr 2009
Reputation:
0
Hi y'all, been inactive on the forums for a small time..
Anyway, I felt like making a grenade launcher script, but I've spotted a problem..
Is there any way, to detect if the grenade hits a building/wall/mountain?
Plus, I think my GetPosFromView is kinda f... up, is there a better way to find where the player is aiming at?
Any help will be appreciated ofcourse.
Best regards, Martin.
Posts: 1,781
Threads: 13
Joined: Sep 2009
Reputation:
0
is your script applying some sort of "fake gravity"? i mean, is the grenade object falling down after you threw it away? if so, then you can check if the grenade falls down (the z axis height decrementing). the mapandras plugin will detect if it hits the ground, and even if it hits a wall bigger than 1 unitІ regardless its direction.
Posts: 844
Threads: 32
Joined: Apr 2009
Reputation:
0
Actually, my grenade's just fucked up, it moves to where i clicked the grenade launcher to, if it's on the ground, if i shoot it in the air, the explosion & grenade will simply be on the ground, and their positions are crap too, not where i am at.. so that's why i wonder how to improve aim position..
Posts: 844
Threads: 32
Joined: Apr 2009
Reputation:
0
But I am using MapAndreas -_-, so how do i create this 'fake' gravity with a grenade object?
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
To make it arch? Just move it down over time.
I don't see how you're going to do this though - you can't detect walls.
Posts: 844
Threads: 32
Joined: Apr 2009
Reputation:
0
[ame=http://www.youtube.com/watch?v=wvwkcYZn4Ts]Grenade launcher by Mauzen[/ame]
Now, this looks interesting.. Created by the awesome Mauzen, but unfortunately, there is no release of this script, anyway. Going to bed now.