can actors walk -
PSYCHOBABYKILLA - 07.05.2015
can actors walk? the reason of the question will it ever be possible atleast any time soon or is it already that you can
have pedestrians like in single player
im assuming actors are like less advanced bots and are going to replace like shop cashiers
Re: can actors walk -
Crayder - 07.05.2015
Technically, yes. But it will take some advanced coding, math, and pre-defined paths to get there sync right.
Re: can actors walk -
PSYCHOBABYKILLA - 08.05.2015
may i get an idea of how to do it i find nothing for actors
im also having another problem thats pissing me off
im gettin tag mismatch onplayergivedamageactor i just copied the code from samp wiki
Код:
public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart)
{
new string[128], attacker[MAX_PLAYER_NAME];
new weaponname[24];
GetPlayerName(playerid, attacker, sizeof (attacker));
GetWeaponName(weaponid, weaponname, sizeof (weaponname));
format(string, sizeof(string), "%s has made %.0f damage to actor id %d, weapon: %s", attacker, amount, damaged_actorid, weaponname);
SendClientMessageToAll(0xFFFFFFFF, string);
if(!IsActorInvulnerable(damaged_actorid)) //Check if actor is vulnerable
{
new Float:health;
GetActorHealth(damaged_actorid, health); //Get current health
SetActorHealth(damaged_actorid, health-amount); //Apply damage, set new health
}
return 1;
}
source of code:
https://sampwiki.blast.hk/wiki/OnPlayerGiveDamageActor
error and warnings
error 035: argument type mismatch (argument 2)
warning 213: tag mismatch
warning 213: tag mismatch
on these lines
GetActorHealth(damaged_actorid, health); //Get current health
SetActorHealth(damaged_actorid, health-amount); //Apply damage, set new health
what am i doing wrong i already got an actor in there
Re: can actors walk -
Crayder - 08.05.2015
I don't get any mismatch warning, that's odd.
Re: can actors walk - Emmet_ - 08.05.2015
in real life they can
Re: can actors walk -
TakeiT - 08.05.2015
yes, use a walking anim on them, set their z rotation when needed etc
Re: can actors walk -
PSYCHOBABYKILLA - 08.05.2015
ok i read a bunch of junk about set there position and make them walk
how to make them walk using animations and set player position what would i need lots of timers
i planned on putting around like 200 actors walking around if it dont act up on my gamemode
can someone give me like a template of an actor walking in a straight line or something
then i can get the idea and get started
Re: can actors walk -
Crayder - 08.05.2015
You clearly don't understand what I said before, "it will take some advanced coding, math, and pre-defined paths."
You can't just play an animation and set their position accordingly. In fact, when an animation is controlling their position you can't even get their correct position, that's where the math and pre-defined paths come in. Plus, if you don't use predefined paths or something like the pathfinder plugin you're going to have to deal with them dealing with their own collisions. They are not like NPC's when it comes to going through objects. They go AROUND the object so it'll really hard to know where they are going to be.
Re: can actors walk -
PSYCHOBABYKILLA - 08.05.2015
Quote:
Originally Posted by Crayder
You clearly don't understand what I said before, "it will take some advanced coding, math, and pre-defined paths."
|
i understood you loud and clear it sounds like a challenge but im not retarded so i think i can do it
where would i start all i see on all the post is the same old bullshit " IT WILL TAKE ADVANCED CODING"
that answer does not help even a little bit my 5 year old sister could have told me that answer
Re: can actors walk -
[KHK]Khalid - 08.05.2015
Quote:
Originally Posted by PSYCHOBABYKILLA
can someone give me like a template of an actor walking in a straight line or something
then i can get the idea and get started
|
Alright, something like
this is what you're looking for?
P.S Check older betas!