Jump to content

MonsterAI


SpEcIeS
 Share

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?

SpEcIeS

Link to comment
Share on other sites

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.

SpEcIeS

Link to comment
Share on other sites

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.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

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.

SpEcIeS

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

 Share

×
×
  • Create New...