Actors
#1

Kalcor says:
Quote:

The 0.2.5 actors were not synced. What you are seeing in those videos is essentially just GTA:SA's single player AI. I could go and add everything from single player to SA-MP including all the street peds, but it wouldn't synced, so what's the point?

We never released anything to do with 0.2.5 actors. What you see in those videos was leaked by someone passwording a beta team member on this forum. That stuff was added for testing only and I figured out quickly it would not work well with the way SA-MP was designed. What those videos aren't showing you is that the actors could only drive for around 200 meters around the player.

I added the actor system in 0.3.7 because I could see someone wanting to complete their server scripted casino but they didn't want to set up a whole bunch of NPCs. I had no intention of extending it beyond that for 0.3.7.

SA-MP will probably never have peds that can roam around freely, or drive cars by AI. It has already been attempted many times by different people, including myself. There have been various hacks to do bots/extended NPCs and they haven't been that popular. There has never been a great enough demand from the servers that hold most of SA-MP's players to focus time and resources on AI.

Do actor synchronized for all players is heavy / impossible, I agree.
But can create player-actor.

Something like this:

Code:
//PlayerActor
native CreatePlayerActor(playerid,modelid,Float:X,Float:Y,Float:Z,Float:Rotation,name[]);
native DestroyPlayerActor(playerid,PlayerActorid);
native SpawnPlayerActor(playerid,PlayerActorid);
native PlayerActorMoveTo(playerid,PlayerActorid,movetype,Float:X,Float:Y,Float:Z);
native PlayerActorEnterVehicle(playerid,PlayerActorid,vehicleid,passenger);
native PlayerActorExitVehicle(playerid,PlayerActorid,vehicleid);
native PlayerActorDriveVehicleTo(playerid,PlayerActorid,vehicleid,Float:X,Float:Y,Float:Z,Float:Speed,drivetype,Float:MinAltitude=0.0,Float:MaxAltitude=0.0);

//PlayerActorinfo
native SetPlayerActorPos(playerid,PlayerActorid,Float:x,Float:y,Float:z);
native SetPlayerActorPosFindZ(playerid,PlayerActorid,Float:x,Float:y,Float:z);
native GetPlayerActorPos(playerid,PlayerActorid,&Float:x,&Float:y,&Float:z);
native SetPlayerActorFacingAngle(playerid,PlayerActorid,Float:ang);
native GetPlayerActorFacingAngle(playerid,PlayerActorid,&Float:ang);
native SetPlayerActorInterior(playerid,PlayerActorid,interiorid);
native GetPlayerActorInterior(playerid,PlayerActorid);
native SetPlayerActorHealth(playerid,PlayerActorid,Float:health);
native GetPlayerActorHealth(playerid,PlayerActorid,&Float:health);
native SetPlayerActorArmour(playerid,PlayerActorid,Float:armour);
native GetPlayerActorArmour(playerid,PlayerActorid,&Float:armour);
native SetPlayerActorTeam(playerid,PlayerActorid,teamid);
native GetPlayerActorTeam(playerid,PlayerActorid);
native SetPlayerActorColor(playerid,PlayerActorid,color);
native GetPlayerActorColor(playerid,PlayerActorid);
native SetPlayerActorSkin(playerid,PlayerActorid,skinid);
native GetPlayerActorSkin(playerid,PlayerActorid);
native SetPlayerActorWeapon(playerid,PlayerActorid,weaponid);
native ResetPlayerActorWeapon(playerid,PlayerActorid);
native SetPlayerActorName(playerid,PlayerActorid,constname[]);
native GetPlayerActorState(playerid,PlayerActorid);
native GetPlayerActorWeapon(playerid,PlayerActorid);
native GetPlayerActorKeys(playerid,PlayerActorid,&keys,&updown,&leftright);
native GetPlayerActorName(playerid,PlayerActorid,constname[],len);

//PlayerActorcontrols
native PutPlayerActorInVehicle(playerid,PlayerActorid,vehicleid,seatid);
native GetPlayerActorVehicleID(playerid,PlayerActorid);
native GetPlayerActorVehicleSeat(playerid,PlayerActorid);
native RemovePlayerActorFromVehicle(playerid,PlayerActorid);
native PlayerActorApplyAnimation(playerid,PlayerActorid,animlib[],animname[],Float:fS,opt1,opt2,opt3,opt4,opt5);
native PlayerActorClearAnimations(playerid,PlayerActorid);

//PlayerActorconditionals
native IsPlayerActorConnected(playerid,PlayerActorid);
native IsPlayerActorInVehicle(playerid,PlayerActorid,vehicleid);
native IsPlayerActorInAnyVehicle(playerid,PlayerActorid);

//VirtualWorlds
native SetPlayerActorVirtualWorld(playerid,PlayerActorid,worldid);
native GetPlayerActorVirtualWorld(playerid,PlayerActorid);
This is very useful, even if it was only for one player. It would be good with it to from single-player missions. There is no need to synchronize for all players.
Reply
#2

you have NO idea what you are talking about when you say
Quote:

There is no need to synchronize.

Iknow alot of people want better npc's /actors but this post doesnt help anything.
stop it before the dev team thinks twice about adding better npc's at all.
Reply
#3

Quote:
Originally Posted by AIped
View Post
you have NO idea what you are talking about when you say
Iknow alot of people want better npc's /actors but this post doesnt help anything.
stop it before the dev team thinks twice about adding better npc's at all.
Kalcor not do better actor. That is the reason why I wrote this. Half a loaf is better than no bread.
Reply
#4

Quote:

Half a loaf is better than no bread

LOL well actually
i think its good to have adding actors for the use of shops..diners..strip clubs and so without loosing any player slots. i think that is what these actors are meant for
and npc's are for more A.I. stuff like you were talking about...not that npc's can do much better though.
Reply
#5

Notice: SA-MP 0.3.7 is currently in feature lock-down. This will likely be the final RC testing phase for 0.3.7.
Reply
#6

NPC can just play what we record him. Actor has much more potential.
Quote:

Notice: SA-MP 0.3.7 is currently in feature lock-down. This will likely be the final RC testing phase for 0.3.7.

This text is already there from RC5
Reply
#7

And how would per-player actors be able to drive a vehicle? Vehicles can not be created per-player, so it would only sync for that specific player.
Reply
#8

Quote:
Originally Posted by Emmet_
View Post
And how would per-player actors be able to drive a vehicle? Vehicles can not be created per-player, so it would only sync for that specific player.
I forgot it. Add CreateActorVehicle
Reply
#9

Quote:
Originally Posted by ATomas
View Post
I forgot it. Add CreateActorVehicle
Like Emmet said..its not possible just forget about it..saves you alot of time trust me.
Reply
#10

It looks like you are suggesting everything that NPCs are capable of.
Actors are static models which don't move. They are here to be spawned in stores or somewhere else, not to drive around town or something.
Reply
#11

Quote:
Originally Posted by dominik523
Посмотреть сообщение
It looks like you are suggesting everything that NPCs are capable of.
Actors are static models which don't move. They are here to be spawned in stores or somewhere else, not to drive around town or something.
yea i tried explaining that too :S
Reply
#12

If you want to understand the nodes part you need to check out Gamer_Z routeconnector plugin.
i still dont understand half of how it works. I started building a simple gps system following a tutorial gamer_z made somewhere.
This actually worked fine untill i wanted fcnpc's to point out their own route.
if i remember correct the npc did calculate its route but looked like setting its position to the last node.
Thats where NaS came in to save the mess i made in my script XD.
I told m that my idea was to make the npc's choose a route (point a random node on the map) randomly and then they'll move to there from their starting position.

thats basicly it

quaternions thing was a problem untill gamer also made this quaternion thingy
Reply
#13

Quote:
Originally Posted by AIped
Посмотреть сообщение
If you want to understand the nodes part you need to check out Gamer_Z routeconnector plugin.
i still dont understand half of how it works. I started building a simple gps system following a tutorial gamer_z made somewhere.
This actually worked fine untill i wanted fcnpc's to point out their own route.
if i remember correct the npc did calculate its route but looked like setting its position to the last node.
Thats where NaS came in to save the mess i made in my script XD.
I told m that my idea was to make the npc's choose a route (point a random node on the map) randomly and then they'll move to there from their starting position.

thats basicly it

quaternions thing was a problem untill gamer also made this quaternion thingy
Thank you for explanation if you want to talk about NPC stuff I'll be glad to communicate with you via Skype chat, my Skype: neutralneu. I'm looking for NPC interested ppl already about 3 years
Reply
#14

Quote:

I'm looking for NPC interested ppl

Im gonna PM you about this anyone with plugin/programming or whatever good scripting knowledge feel free to join in. (PM me)
Reply
#15

It's not true that there is no legal (so no memory hacking etc) synced vehicle AI script.

Btw AIped, I can give you all the resources and scripts for our NPC driver system. PM me if you want.
At the current state there is almost no lagging, just in too steep streets it looks ugly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)