Recent posts

#51
Tutorials / Re: Walking npc
Last post by [TDA]Speed - Nov 10, 2024, 04:12 PM
Quote from: MEGAMIND on Nov 10, 2024, 10:30 AM
Quote from: [TDA]Speed on Nov 10, 2024, 09:30 AM
Quote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xD
actually there is alot of AI-stuff can be done (and needed for DM-gamemods). I feel fear when I imagine how much work should be done to make npc to act like real players in terms of DM.
maybe we can make something more easliy then this like know the nearest pos of npc and walk to it

i did it eventaully u can do it too, get the nearest player id from distanceotpoint and walk it there.. an example here it moves twoards the loaction of player where ever it is going
Quote from: MEGAMIND on Nov 10, 2024, 10:30 AM
Quote from: [TDA]Speed on Nov 10, 2024, 09:30 AM
Quote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xD
actually there is alot of AI-stuff can be done (and needed for DM-gamemods). I feel fear when I imagine how much work should be done to make npc to act like real players in terms of DM.
maybe we can make something more easliy then this like know the nearest pos of npc and walk to it

i did it eventaully u can do it too, get the nearest player id from distanceotpoint and walk it there.. an example here it moves twoards the loaction of player where ever it is going
lool man thats awsome! nick work
#52
Tutorials / Re: Walking npc
Last post by MEGAMIND - Nov 10, 2024, 10:30 AM
Quote from: [TDA]Speed on Nov 10, 2024, 09:30 AM
Quote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xD
actually there is alot of AI-stuff can be done (and needed for DM-gamemods). I feel fear when I imagine how much work should be done to make npc to act like real players in terms of DM.
maybe we can make something more easliy then this like know the nearest pos of npc and walk to it

i did it eventaully u can do it too, get the nearest player id from distanceotpoint and walk it there.. an example here it moves twoards the loaction of player where ever it is going
#53
Tutorials / Re: Walking npc
Last post by [TDA]Speed - Nov 10, 2024, 09:30 AM
Quote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xD
actually there is alot of AI-stuff can be done (and needed for DM-gamemods). I feel fear when I imagine how much work should be done to make npc to act like real players in terms of DM.
maybe we can make something more easliy then this like know the nearest pos of npc and walk to it
#54
Tutorials / Re: Walking npc
Last post by [TDA]Speed - Nov 10, 2024, 09:30 AM
Quote from: habi2 on Nov 04, 2024, 05:05 PMHi [TDA]Speed, we can definitely think about making a path-finding npc. In fact from an IPL file, the path can be found. Ah yes, when given command to go to a location, it will walk through the road making left turn or right turn. it is possible now.
i just knew that path finding maybe could be lag but i tried to understand the walking script code of yours what if player gets close exmple npc cop and wanted player if the wanted player near to npc he will start follow him like
this is from npc walking script if( GetDistanceFromMeToPoint( pos ) < 2 ) WalkToPoint( pos );
pos = wanted player.Pos
so would this work ?
#55
Videos & Screenshots / Re: TDC screenshots/videos
Last post by MEGAMIND - Nov 09, 2024, 07:43 PM
Presenting npcAI( ) with Habi's NPC

#56
Community Plugins / Re: NPC/Bots implementation in...
Last post by MEGAMIND - Nov 09, 2024, 04:23 PM
Quote from: habi2 on Nov 09, 2024, 04:11 PMAbout crashing of server (i hope it is server that is crashing), when you use RFC repetitiously there might be some bug which i will look now.
yes serverside.exe gets closed

Suggestion lookatplayer should be as syncd as whn npc is targetting and shooting player, add the same mechanics to lookatplayer too @habi2
#57
Community Plugins / Re: NPC/Bots implementation in...
Last post by MEGAMIND - Nov 09, 2024, 04:22 PM
Quote from: habi2 on Nov 09, 2024, 04:11 PMHi @MEGAMIND, i see your messages and will fix it one by one.
Quotenpc is dead how he gonna spawn back?, bcz i see a msg that i have spawned but not actully spawned, even though i get npc it says player not spawned
Use RequestSpawn to spawn the npc.when it is dead. It will spawn in the same class.
function OnPlayerDeath(playerid)
{
if(playerid==GetMyID())
              RequestSpawn();
}
About crashing of server (i hope it is server that is crashing), when you use RFC repetitiously there might be some bug which i will look now.
why does it change skin? though i have a skin already in connect ConnectNPCEx("[A.I]ChatGPT", Vector (-1735.81, -266.977, 14.8683),  -0.172573, 212, 24, 4,"npc.nut",true,"wno-host.ddns.net","rpclib z-finder actionlib npcmodule");
its changing into lovefist skin
#58
Community Plugins / Re: NPC/Bots implementation in...
Last post by habi2 - Nov 09, 2024, 04:11 PM
Hi @MEGAMIND, i see your messages and will fix it one by one.
Quotenpc is dead how he gonna spawn back?, bcz i see a msg that i have spawned but not actully spawned, even though i get npc it says player not spawned
Use RequestSpawn to spawn the npc.when it is dead. It will spawn in the same class.
function OnPlayerDeath(playerid)
{
if(playerid==GetMyID())
              RequestSpawn();
}
About crashing of server (i hope it is server that is crashing), when you use RFC repetitiously there might be some bug which i will look now.
#59
Community Plugins / Re: NPC/Bots implementation in...
Last post by MEGAMIND - Nov 09, 2024, 03:53 PM
function OnNPCSpawn()
{


     SendChat("I have spawned");

SetTimerEx("SetMyPos",700, 1, npc_pos );
SetMyPos(npc_pos);



}

function OnPlayerDeath(playerid)
{
OnNPCSpawn();
}
npc is dead how he gonna spawn back?, bcz i see a msg that i have spawned but not actully spawned, even though i get npc it says player not spawned
#60
Community Plugins / Re: NPC/Bots implementation in...
Last post by MEGAMIND - Nov 09, 2024, 11:40 AM
what i did that i tried even placing this rfc command at on playermove the server started and clsoed immedialtely @habi2