Jump to content

Recommended Posts

Posted

When I use pointentity to make enemies point to main character(player) it makes the enemy glide toward main character. Is this an intended feature of pointentity . When I noticed this tendency I thought I might as well use the enrmy walk animation sunce the darned thing is moving anyway.

 

 

 

 

If stopanim = False

If EntityDistance(jane,knight) < 7 And EntityDistance(jane,knight) > 1

PointEntity(knight,jane)

knight_walk()

ElseIf EntityDistance(jane,knight) < 1

PointEntity( knight,jane)

jane_attack()

knight_attack()

EndIf

EndIf

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Posted

Strange. Must something in the main loop causing it but I have turned it to my advantage.

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Posted

No it was mving without the knight_walk function,I just thought if its gonna move I might as well use thewalk function.

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

  • 8 years later...
Posted

Hello team!!

After read learn page with the example and this thread I'm still trying to use and understand PointEntity... But i can't make this go to walk...

¿Could you help me? I have a scene with only 3 elements in there:

  1. A camera named: MobileCamera
  2. A model named: SpaceShip
  3. A brush called: Earth

Camera.jpg.3b35cba14962319e684f356bee9107a5.jpg

I want make MobileCamera (with Script called PointToShip.lua) always point to SpaceShip, but my code or my bad sintax doesn't work...

This is my code:

Entity1 = GetEntityByName("MobileCamera")
Entity2 = GetEntityByName("Spaceship")

function Script:Start()
	self.enabled=true
end

function Script:UpdateWorld()
	PointEntity(Entity1,Entity2)
end

I have read @Rick thread-topic about this command. But i don't understand to make success the sintax anyway...

Many thanks!!

Posted

This thread is from 2011. There is no PointEntity anymore, it is Point.

self.entity:Point(Entity2)

self.entity is the entity the script is attached to.

 

---

Scott

 

Using Windows 7 Ultimate 64 bit/Core I7-2700K @ 4312mhz/24G RAM/Nvidia GTX 1060

Posted

I had forgotten this thread.It was about le 2.

Its the follow function along with point that makes enemy follow main character.

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

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.

×
×
  • Create New...