Ok, so I loaded up my barrels, and now I need my player to be able to move them around by pushing them in 3d space. so here is the code I am trying and it is not working, is there a beter way?
for b= 18 to 25 // All of my barrels
// my players position
oldx# = object position x(2)
oldy# = object position y(2)
oldz# = object position z(2)
// when my player collides with the barrels
if OBJECT COLLISION(2,barrels(b).barrelstype)=1
sc_updateObject barrels(b).barrelstype
sc_updateObject player(1).pstate
endif
// trying to move the barrels
if OBJECT COLLISION(2,barrels(b).barrelstype)=1 and keystate(25)=1 and upkey()=1
sc_updateObject barrels(b).barrelstype
sc_updateObject player(1).pstate
position object barrels(b).barrelstype,oldx#+30,oldy#,oldz#
move object barrels(b).barrelstype,3
endif
if OBJECT COLLISION(2,barrels(b).barrelstype)=1 and keystate(25)=1 and downkey()=1
sc_updateObject barrels(b).barrelstype
sc_updateObject player(1).pstate
position object barrels(b).barrelstype,oldx#-30,oldy#,oldz#
endif
next b
my signature keeps being erased by a mod So this is my new signature.