Feature Creep / Simple waypoint script

Author
Message
Gtox
3D Media Maker
6
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 9th Aug 2014 14:13
Would it be possible to release a simple waypoint script that you could attach to any entity and have it follow waypoints? It would make life much easier for those of us who are not great at scripting. I've tried taking the waypoint code from the existing scripts, without success.
smallg
Community Leader
15
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 9th Aug 2014 17:59 Edited at: 9th Aug 2014 18:00
not 100% sure you need all of that code but it works so it'll do (maybe someone who understands it better can clean it up)







note; no idea why but your raptor lies down when using it but the shark & stock characters work fine

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11

Attachments

Login to view attachments
Gtox
3D Media Maker
6
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 10th Aug 2014 16:13
Thanks smallg, that works well. It's the raptor's death animation that plays, so it's getting called somewhere in the script.
This thread should probably be moved to scripts.
Gtox
3D Media Maker
6
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 10th Aug 2014 16:14
Just had a look, and I see that there's no animation called in the script - weird.
Jerry Tremble
GameGuru TGC Backer
8
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 12th Aug 2014 02:01
Quote: "AIEntityGoToPosition(EntObjNo,ai_patrol_x[e],ai_patrol_z[e])"



There is no animation called in the script, but when it is calling that function, I'd hazard a guess that it's calling an internal function and that's where (I'd guess) the animations are being called. I'd bet if you limit your raptor's walk cycle to the same as the other characters', it might work.?? We used to be able to control animation/frame ranges in the fpe (classic); don't know if we have that ability yet in reloaded.

MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 8.1/64, GeForce GTX645 (passmark 1898); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 8.1/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
smallg
Community Leader
15
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 12th Aug 2014 18:20
yep there are two ways to control the animations
inside the fpe you can set
anim0 = start frame, end frame
anim1 = start frame, end frame
etc

or inside a script you can use -note i believe this doesnt work correctly yet but should in the hotfix
SetAnimationFrames(start, end)

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
waypont
6
Years of Service
User Offline
Joined: 25th Apr 2015
Location:
Posted: 25th Apr 2015 03:15
My GameGuru say every time "function ai_soldier_main not found" can you plz show the full CODE?
PM
Pirate Myke
Forum Support
10
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 25th Apr 2015 03:33
Usually indicates that then name of the script and the init and the main are not the same name. Check that out.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

waypont
6
Years of Service
User Offline
Joined: 25th Apr 2015
Location:
Posted: 27th Apr 2015 01:38
My code not work.

This code is to patrol example where the enemy goes from one point and back.

Like, he goes to X, go to Y, go to Z and back to X.

Is this the code?

I'm looking for that code.
PM
Pirate Myke
Forum Support
10
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 27th Apr 2015 04:09
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Login to post a reply

Server time is: 2021-05-09 04:51:12
Your offset time is: 2021-05-09 04:51:12