Product Chat / [SOLVED] Player damage

Author
Message
SOLO DESIGN
16
Years of Service
User Offline
Joined: 30th Jul 2008
Location: Kent, England
Posted: 16th Apr 2020 11:50
Hi,
I have a weird issue where the model I have created in GG, he now attacks using AI scripting but as the model hits the player there is no damage. This is a melee character model with a sword as part of the model.

Is this down to the firespot on the model ?

Thanks

The author of this post has marked a post as an answer.

Go to answer
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 16th Apr 2020 13:44
I'm not sure the firespot is used with melee anims. I think it is down to animation frames and distance. But, I am only guessing from the perspective of how I would go about it. The AI scripts may have changed since I last looked any over.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
SOLO DESIGN
16
Years of Service
User Offline
Joined: 30th Jul 2008
Location: Kent, England
Posted: 16th Apr 2020 14:16
Hi Dvader,

Well he is animating well, and right infront of the player (as in player cannot move forward as enemy blocking the way)

The enemy swings his sword but the player does not get a scratch, using the same AI script on another model and it does hurt the player, which makes me think it is the model, but I cannot see where the issue is....... very odd!

PM
SOLO DESIGN
16
Years of Service
User Offline
Joined: 30th Jul 2008
Location: Kent, England
Posted: 16th Apr 2020 15:09 Edited at: 16th Apr 2020 17:07
To see the issue.


PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 16th Apr 2020 16:16 Edited at: 16th Apr 2020 16:19
Listed as private, you would have to list it as unlisted I think to share it.

You can use this snippet to show it directly


Oh what AI script are you using btw? There are different ones for different characters. Default soldier type, Fantasy etc.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
SOLO DESIGN
16
Years of Service
User Offline
Joined: 30th Jul 2008
Location: Kent, England
Posted: 16th Apr 2020 17:01 Edited at: 17th Apr 2020 11:09
Hi DVader,

I am using the AI FANTASY CHARACTER one and have changed it to my character. I have now got the player being Hurt when he is attacked by the enemy - It was down to HurtPlayer was not in AI script when attacking -

Now I have another issue..... I want some animation frames to play when the player is <400 distance, I got this working in a test script -

Here is the test script -




But I want to merge the above test script which works well with the AI script I am using (basically one script), but I keep getting loads of errors!! Pulling hair out now!!



Here is AI script -




Any help would be great!!
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 16th Apr 2020 19:24
Quote: "Any help would be great!! "

The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 16th Apr 2020 21:00
I'd like to say it's easy, but it isn't. You won't get that code merged without a lot of work. You need to adapt that code to suit the main AI. You can't easily use manual control, because the second (main AI) needs automatic control for it's commands. Now, you may be able to mix and match by flipping control methods as you need them, but you would have to experiment.

I would study the AI code and work out how the states work and then try to emulate those to fit your goal. It sounds lame re-reading this advice, but that is the way to go. Don't try to sledgehammer your way in by pasting all, or parts of the first code in. Examine the states in the code that work perfectly and try to adapt your added states to reflect them.

Might sound like a load of old nonsense, but apart from sitting down, and experimenting with the code best I can do
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
SOLO DESIGN
16
Years of Service
User Offline
Joined: 30th Jul 2008
Location: Kent, England
Posted: 17th Apr 2020 08:23
Thanks DVader, good advice!
PM
SOLO DESIGN
16
Years of Service
User Offline
Joined: 30th Jul 2008
Location: Kent, England
Posted: 17th Apr 2020 11:24
Is it possible to run a script for an entity and when that script has finished run a different script?

This way I would not need to merge the above 2 scripts and could use Manual control of the entity script 1 and then go on to Automatic control of the entity script 2 - which would be good solution moving forward....
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 17th Apr 2020 11:58 Edited at: 17th Apr 2020 11:59
Yes, you use the require "" and SwitchScript(e,str) commands.

Basically in your script header you set the script to require the second script, then in the main part of the scrip you use SwitchScript to switch to the new script.

Don't ask me for more detail than that, i'm not very good at that part of LUA

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
SOLO DESIGN
16
Years of Service
User Offline
Joined: 30th Jul 2008
Location: Kent, England
Posted: 17th Apr 2020 12:38
This post has been marked by the post author as the answer.
Thanks Belidos, smallg said the same, just testing the theory. Thanks Again.
PM

Login to post a reply

Server time is: 2024-11-23 17:16:39
Your offset time is: 2024-11-23 17:16:39