SET_PLAYERMODEL Crash -1 reply

Please wait...

SUPERMIKE0911

I'm too cool to Post

50 XP

9th November 2003

0 Uploads

3 Posts

0 Threads

#1 5 years ago

Hey Guys,

Haven't posted in a long time if ever. I've checked all over the forum and whilst there's been a couple of answers surrounding what i'm doing apparently there's nothing the same of sorts...

Anyway i've just started trying to do some custom sort of ai stuff in ICARUS with a simple map. I've got a bunch of stormtroopers as npc's and i've got all of them set to run a spawnscript. Inside that spawnscript my understanding is that the entity that calls the script is the entity that commands are run on. It's the owner. This works fine for almost everything I do but if i try to SET_PLAYERMODEL in behaved to something like kyle (too make them all kyles for example), when i try to run the map it comes back with sv_getuserinfo error bad index 10 or something around those lines. The number changes occasionally.

I've got 1.01 patch installed. It's obviosuly a legal copy and like I say other commands work but this playermodel one just doesn't. I really want to set them to "battledroid" not Kyle for my script but I tthought i'd try a standard game playermodel to see if that works but obviously no luck.

Any help would be appreciated.

Cheers

Wes




SUPERMIKE0911

I'm too cool to Post

50 XP

9th November 2003

0 Uploads

3 Posts

0 Threads

#2 5 years ago

bump?




jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#3 5 years ago

Have you tried using AFFECT()?




SUPERMIKE0911

I'm too cool to Post

50 XP

9th November 2003

0 Uploads

3 Posts

0 Threads

#4 5 years ago

Fairly sure I did yes. To use affect on the users player in single player how would you use affect? affect("player")... I'm not sure how to targetname the user character.

Although if that is the case does that make the playermodel command different in scope for a spawnscript? Becuase if the spawnscript is run on stormtrooper A and every command works but playermodel and you have to use affect just for that command...seems a bit weird to me.




jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#5 5 years ago

There are weird things in ICARUS. Try a wait(1000) on the start of your spawnscript, maybe the NPC object is not created yet, that's why you get an error. By the way you can use AFFECT() with the NPC_Targetname key. And yes, player's is Player (without quoting marks).