TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
138 stars 56 forks source link

Bug Animals script #4377

Open SampeyFS opened 1 year ago

SampeyFS commented 1 year ago

image

putting the animals comes out this script error of foxes, rabbits

AmenMoses commented 1 year ago

Are all the animals set to always active = yes?

SampeyFS commented 1 year ago

yes

davetgc commented 1 year ago

I'm not getting any errors, but they aren't doing anything now. They just sit there.

synchromesh62 commented 1 year ago

I'm not getting any errors, but they aren't doing anything now. They just sit there.

Same here . .No anims nothing, just statues

AmenMoses commented 1 year ago

I wrote the darn thing! 🤦‍♂️

Used to work fine so something in MAX has changed along the way.

AmenMoses commented 1 year ago

Right so someone has altered the script since I wrote it, my line that used IntersectAll has been commented out and instead it now uses IntersectStaticPerformant.

I have no idea what that function is but it is always returning 'nil' so they cannot move.

They are animating for me though, just running the idle animation all the time.

Undoing that change makes them work again:

mammal_generic.zip

SampeyFS commented 1 year ago

Thanks friend

AmenMoses commented 1 year ago

@davetgc Maybe rename this issue to IntersectStaticPerformant (whatever that is) not worky?

(or rename the function IntersectStaticPerformNot)

SampeyFS commented 1 year ago

I tried it, in fact, they still block, the writing also comes out with this that you put in the zip

SampeyFS commented 1 year ago

an update is out now what has been changed?

AmenMoses commented 1 year ago

I'm not getting that script error so haven't a clue what is causing that.

SampeyFS commented 1 year ago

Maybe the skunk is an animal because he's caught stuck and the others go

SampeyFS commented 1 year ago

put lots of rabbits, skunks and foxes and see what it does

AmenMoses commented 1 year ago

They all seem to work fine except the brown sewer rat, that one is broken for some reason.

SampeyFS commented 1 year ago

ah that's what it is then

AmenMoses commented 1 year ago

Not getting any Lua errors though.

SampeyFS commented 1 year ago

ask small he had helped me on this mistake maybe he remembers what it was

AmenMoses commented 1 year ago

Well it's working fine for me so not sure what to ask him! (at least the version in the zip file I posted is working fine)

SampeyFS commented 1 year ago

No that writing comes out

AmenMoses commented 1 year ago

I'm not getting any writing!

AmenMoses commented 1 year ago

What mice?

The black sewer rat works fine but the brown one has issues, think the animations might be dodgy.

Anyhow: https://vimeo.com/814040749

SampeyFS commented 1 year ago

Hello

SampeyFS commented 1 year ago

https://user-images.githubusercontent.com/108415264/229373737-4e560db9-683c-4001-a4d9-c04ca502879e.mov

SampeyFS commented 1 year ago

No it still seemed to go instead it crashed as you see in the video

AmenMoses commented 1 year ago

Notice that after the error showed up you still have a rabbit running around?

That indicates that you have multiple versions of the script present, make sure any old versions are deleted and only the single working script is present in the scriptbank/animals folder (both in the Steam MAX folders and in your Documents area).

SampeyFS commented 1 year ago

mammal_generic.zip This doesn't crash had smalling helped me but I don't know what it did try see the lua if you can understand yourself

AmenMoses commented 1 year ago

Also make sure all mammals are set always active, by default they aren't for some reason (they are also set as enemies by default, don't know why)

AmenMoses commented 1 year ago

The reason smallg's version doesn't crash is because it avoids the problem that is caused when you don't have them always active!

But if they are not set always active then they won't be properly initialised anyhow.

SampeyFS commented 1 year ago

where do I have to change can you show me thanks

AmenMoses commented 1 year ago

To set the always active flag select the critter and: always active

AmenMoses commented 1 year ago

So in summary: 1) The IntersectStaticPerformant Lua function doesn't appear to be working in MAX for some reason. 2) The critters fpe settings are wrong. They should be defaulted to always active=yes(*) and probably to be neutral rather than enemies(**). 3) The brown rat model has something wrong with it, i.e. it doesn't work whereas the brown rat does!

(*) This is so when the player looks down into their plush valley full of wildlife they are not all just stood around like statues, and more importantly so when they are moving they don't suddenly just freeze when an arbitrary distance from the player (but still well within view distance!), especially important in the case of birds. (**) Otherwise they are going to all show up on radar/map displays by default, probably only wanted by users in special cases rather than as by default because critters don't ever attack the player!

See next post but one for new script

SampeyFS commented 1 year ago

oh got it

AmenMoses commented 1 year ago

@davetgc

Aha, IntersectStaticPerformant may actually be working but it doesn't pass back 0 reliably, in most cases it is returning nil, I seem to recall the other Intersect function used to have this problem in GG.

So here is yet another version that allows for the nil return (and assumes the function actually works). If anyone finds that with this critters run through walls or whatever then we will know why.

mammal_generic.zip

SampeyFS commented 1 year ago

okay thanks

SampeyFS commented 1 year ago

now it works well hopefully thanks it is better to update the program to put this that works

davetgc commented 1 year ago

Thanks for all the information.

plemsoft commented 1 year ago

@AmenMoses New script working perfectly! Thanks for the help :) , added for the next update.

SampeyFS commented 1 year ago

20230409213239_1

The animals as you can see in the photo are all still like statues @plemsoft

plemsoft commented 1 year ago

@SampeyFS Yes i see fixed for the next update :)

SampeyFS commented 1 year ago

image

it still crashes nothing is fixed @plemsoft

davetgc commented 1 year ago

@SampeyFS - Just looking at the map/radar in your level. How many characters/objectives do you have active at one time? I'm wondering if this is part of the reason for many of your crashes.

Are they characters or animals?

synchromesh62 commented 1 year ago

@plemsoft Right now they only work for me on flat terrain \ blank Level

SampeyFS commented 1 year ago

animals are

SampeyFS commented 1 year ago

why animals and people are placed as allies does the same see them as enemies?

SampeyFS commented 1 year ago

Senza nome

plemsoft commented 1 year ago

@synchromesh62 @SampeyFS This has been fixed and will be in the next EXP update :)