Jump to content
SpEcIeS

MonsterAI

Recommended Posts

This morning I started up a fresh "Advanced First-Person Shooter" project. After the "07-AI and Events.map" was loaded and then ran, immediately an error was generated:

 

Script Error
error in function 'SetCollisionType'.
argument #3 is 'boolean'; '[no object]' expected.
Line 90

 

Is anyone else producing this error?

Share this post


Link to post

If the following two line are removed then it runs as expected:

 

self.entity:SetCollisionType(Collision.Prop,true)
self.entity:SetCollisionType(Collision.Character,false)

 

When I first applied this to a zombie model, on a separate map, it ran backwards to attack, but "07-AI and Events.map" seems to work normally.

Share this post


Link to post

Like Aggror mentioned, just remove the boolean from those commands (true/false) or just update your project and it will work properly.

 

As for the zombie model running backwards, what is the direction that the model faces when selected in the scene? If it's not facing towards its local +Z axis, then you have to adjust the 'character angle' in its Physics properties panel. Look at the crawler for reference and you will see the character angle is set to 180 because the crawler faces its local -Z axis.

Share this post


Link to post

It would seem that the "mdl" runs backwards, but the "prefab" operates as expected. blink.png Anyway, once I removed the code that I mentioned above, everything works fine. Not sure how beta code slipped its way into this build. Perhaps I will "Verify Integrity" to make sure everything is above board.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...