making the player unable to move !!!

jonsilva

New member
hello

i made a weapon witch the player has to pick up
i wanted the player to be unable to move when he is on this weapon

ive tried
speed -10
nomove 1 1
@cmd stop

but none of it worked the player still moves when the arrow keys are pressed

is it possible to make this weapon unable to move ?
this is weapon txt


Code:
name		hvgun
type		none
health		100
mp		100
speed		-15
running		0 0 0 0 0
jumpheight	3
facing		2
nomove		1
cantgrab	1
notgrab		1
noquake		1
falldie		1
nodieblink	1
makeinv		3
nodrop		1
grabforce       0
candamage	enemy obstacle
diesound        data/sounds/pb2.wav
atchain         1 0 0 0 
animationscript data/scripts/grabscript.c





anim	attack1
		
anim	attackdown

		
anim	attackup


		
anim	backwalk



		
anim	block
		
anim	charge

		
anim	death
	loop	0
	delay	9
	offset	121 201
	frame	data/chars/1plry/idle01.gif
		

		
anim	fall

		
anim	forwardjump

		
anim	idle
	loop	0
	delay	15
	offset	121 201
	bbox	0 0 0 0
	@cmd	stop
	frame	data/chars/1plry/idle01.gif



anim	spawn
	loop	0
	delay	24
	offset	121 201
	bbox	0 0 0 0
	frame	data/chars/1plry/a101.gif




		
anim	jump
		
anim	jumpattack
		
anim	jumpdelay

		
anim	jumpland

		
anim	pain

		
anim	pain2

		
anim	rise

		
anim	run

		
anim	runattack
		
anim	runjump

		
anim	runjumpattack

		
anim	special

		
anim	walk[/color]

name hvgun
type none
health 100
mp 100
speed -15
running 0 0 0 0 0
jumpheight 3
facing 2
nomove 1
cantgrab 1
notgrab 1
noquake 1
falldie 1
nodieblink 1
makeinv 3
nodrop 1
grabforce      0
candamage enemy obstacle
diesound        data/sounds/pb2.wav
atchain        1 0 0 0
animationscript data/scripts/grabscript.c





anim attack1

anim attackdown


anim attackup



anim backwalk




anim block

anim charge


anim death
loop 0
delay 9
offset 121 201
frame data/chars/1plry/idle01.gif



anim fall


anim forwardjump


anim idle
loop 0
delay 15
offset 121 201
bbox 0 0 0 0
@cmd stop
frame data/chars/1plry/idle01.gif



anim spawn
loop 0
delay 24
offset 121 201
bbox 0 0 0 0
frame data/chars/1plry/a101.gif





anim jump

anim jumpattack

anim jumpdelay


anim jumpland


anim pain


anim pain2


anim rise


anim run


anim runattack

anim runjump


anim runjumpattack


anim special


anim walk




 
The nomove parameter dont work with players, try putting the spawn in loop 1.
With that this entity cant move, after that try with the keyint script to change animation manually.
 
Yes, that might work.
Also together with keyint function , you need to make keyscript too. Keyint handles hold key event while keyscript handles press and release key event.
 
thanks for the replys

ive already manadge to get it to work
using modelflag 1 in player weapon.txt
this makes the weapon not copy the player animations model atributes.
then nomove 1 1 works

anim spawn doesnt work when you pick up the weapon...
ive used anim respaw to make it loop in the end when the player releases it...
it works like an interactive object... when the player interacts with it, it plays an animation witch is weapon and the object plays idle and respaw
 
Back
Top Bottom