|
Post by commended on Oct 9, 2016 10:20:10 GMT
Hi all,
As you have probably noticed I want to make a machine gun so you don't have to spam the key, I have attempted making a timer which shoots every split second that loops. Not working out to well...
Any suggestions?
Thanks in advance:)
|
|
|
Post by commended on Oct 9, 2016 14:26:11 GMT
Famer Appreciate the reply but whenever I open the file it crashes
|
|
|
Post by NicusorN5 on Oct 9, 2016 15:27:41 GMT
xD seriously Famer, it crashes 3D Rad... commended Don't worry I will make a project for you! Just wait 5-10 minutes...
|
|
|
Post by NicusorN5 on Oct 9, 2016 15:39:59 GMT
|
|
|
Post by commended on Oct 9, 2016 16:48:58 GMT
NicusorN5 lol, that one crashes too, thanks though guys:)
|
|
|
Post by NicusorN5 on Oct 9, 2016 16:51:43 GMT
Seriously ? Didn't expect that... lol
|
|
|
Post by NicusorN5 on Oct 10, 2016 14:10:18 GMT
Still crashing , commended setting lifetime to 0 helps...
|
|
|
Post by TinSoldier on Oct 10, 2016 21:56:49 GMT
ok heres the problem, open the project before running, delete the sprite or change it to something that you actually have famer didnt include his custom sprite, thats why the project crash's.
Also you mite wanna change the eventoninput repeat rate to 4 instead of 0, but thats youre choice, and it should work for you.
PS NicusorN5's project worked for me no changes..
If after deleting the spite you're still crashing, i suggest reinstalling 3drad over top of your current installation, you wont loose any custom project or objects, this just refresh's the install and should fix any problems except for projects like famers with missing resources.
PS famer also added way to many ball ammo's to the project.. what you need to do is figure out how many shots you want per second, and also figure out haw fast they travel and how far you want them to travel before reseting for reuse.
for instance, you could have 4 ammo's that travel really fast and reset after 0.5 seconds and all you would need is 4 ammo's to give you a continuous machine gun like firing rate.. it's really a trail and error process.
Also are you planning to network your project, like is it going to be multi-player, because this adds another level of issues due to how the ammo and how a target hit will be setup and that info networked..
|
|
|
Post by TinSoldier on Oct 10, 2016 22:48:32 GMT
Here's my view on how ammo should be setup.
For a simple single shot, not to many shots per second, using 3drads normal collision process would be fine.
If you're planning a machine gun with a high fire rate and or planning to network the project, you should instead use this method -
Add a scanner object, this is used to identify a hit situation with a target ( means a target is in view of the scanner and within the proper distance ).
as long as you have a valid target and hit situation, add a certain number of hit points against the target and ammo used by the shooter.
This info can easily be networked in a multiplayer project.
The projectile and its ammo is only used as a visual effect, no collisions are setup or used by it, the scanner will do all the work, except for maybe ammo hitting a wall, then collisions maybe required to keep ammo from penetrating walls for instance.
This allows much better performance of your 3drad project by reducing the collision process's needed but you still have the visual effect to look like a machine gun.
Trying to network each bullets position and orientation, and add collision testing on top of that, would be major work for 3drad, and wouldn't work well if at all with decent performance and networking speed.
How to set this up exactly i cant say, but there is a demo project for the scanner object, and it has a scan distance option ( how far to test for a contact, which would be the ammo's effective shot range) and also you don't want to leave the scanner running continuously, it uses a lot of CPU to do it's job, it's better to turn it on only while the shooter is pulling the trigger, or maybe only in short burst's while holding the trigger.
that's my 4 scents worth..
PS i think fernando made a big mistake by not including may more demo projects to show how things could be done with the engine, to inspire user's to use 3drad... It seems to me most of the demo projects are way too basic and designed to be as simple as possible, leaving out a lot of info on how to do things.
After all 3drad was designed to be used by the novice 3dgame maker with options like scripting for the more advanced users.
|
|