|
Post by bartyrocks3 on May 11, 2016 17:39:54 GMT
I am willing to work...
Right now I am on a trip to a wedding about 500 miles from home without my pc, so when I get back on monday, we will continue on this thread. But for now, I am afk. Thanks!
|
|
|
Post by bartyrocks3 on May 18, 2016 20:18:03 GMT
Ok. Not afk anymore
|
|
|
Post by cypermethrin on May 18, 2016 21:42:42 GMT
OK then, as last post...start to break it down to individual reactions to situations
|
|
|
Post by indiedev on May 20, 2016 12:48:43 GMT
the legendary shadmar already made a plane ai script on the now closed rad site. i have all the pages from an offline archive downloaded but sadly files are not included, so many usefull resources gone...
|
|
|
Post by indiedev on May 20, 2016 13:09:54 GMT
|
|
|
Post by bartyrocks3 on May 20, 2016 15:51:03 GMT
Thanks indiedev. Now the question is, if the ai is 15 meters away, I want it to start shooting projectiles STRAIGHT at the target (you). That is my new question. how da heck am I going to do that??
|
|
|
Post by Power Supersport on May 20, 2016 15:54:24 GMT
I hope that helps:
Vector3 Player, Enemy; void Main () {
iObjectLocation(Player); iObjectLocation(Enemy);
if (iVectorLength(Player-Enemy) < 15) { // Shooting algorithm goes here... } }
|
|
|
Post by bartyrocks3 on May 21, 2016 14:22:36 GMT
Where do I add this? In its own script? Do I hook it up to multiple projectilea? How does this work? I don't understand...
|
|
|
Post by Power Supersport on May 21, 2016 15:15:31 GMT
Barty, you must have basic script knowledge... Do you have some?
You must have this script as a new object... Then you have to link the player first, then the enemy, then the projectile...
Vector3 Player, Enemy; int delay; void Main () {
iObjectLocation(OBJ_0, Player); iObjectLocation(OBJ_22, Enemy);
if (iVectorLength(Player-Enemy) < 15) { delay += 1; if (delay < 1) iObjectStart(OBJ_44); // shoot if (delay > 60) delay = 0; // when to shoot again } }
|
|
|
Post by cypermethrin on May 21, 2016 20:23:50 GMT
This is why I was going to go through it step by step from scratch...
...Give a man a fish and he'll eat for a day, teach a man to fish and he'll never go hungry
|
|
|
Post by Power Supersport on May 21, 2016 20:43:18 GMT
I was trying to give the guy a headstart... But this is not the first time I encountered someone who doesn't understand... No offense to barty, it happens to everyone...
|
|
|
Post by indiedev on May 23, 2016 3:02:13 GMT
maybe scripting is a bit beyond barty for now, since he hasn't figured out how to do that yet using just objects alone. hint: you only need maybe 3 so read all docs in the help folder to know what they all do, then get some similar examples from the link i provided as seeing it in action and disecting it is a good way to learn.
|
|
|
Post by bartyrocks3 on May 23, 2016 12:19:53 GMT
I know how to put a in script, check it and link it.. but that's about it :/
I have a minors in vb.net, but that is the only language I understand.
|
|
|
Post by indiedev on May 24, 2016 4:37:49 GMT
you don't even need a script for what you wanted, it took me 5secs to think what objects are needed as i know what they all do from reading up on them numerous times.
|
|
|
Post by nick on May 24, 2016 8:24:38 GMT
power can you teach how to create a airplane al
i dont know how to create force
|
|
|
Post by bartyrocks3 on Jun 5, 2016 2:37:56 GMT
indiedev, please please please tell me what object I need to make it shoot. Thank you in advance!!!!
|
|
|
Post by indiedev on Jun 7, 2016 3:06:59 GMT
one of rad's built in demo projects will show you how better than i can explain it, you need to see it in action.
|
|