Page 1 of 2

Changing soldiers speed.

Posted: Sat Jan 23, 2010 10:56 am
by itsmei
Hi, i am battlef13ledmad and changed my name to itsmei.... I AM SO GLAD THE WEBSITES BACK!!

This code i have done to make you go fast when crawling:

Code: Select all

rem ** Fast Crawling **

AnimationStateMachine.setActiveState Lb_LieForward
AnimationStateMachine.setSpeed 20 1.0 1.0

AnimationStateMachine.setActiveState Lb_LieBackward
AnimationStateMachine.setSpeed 20 1.0 1.0
On my server noobs use it so they fire and crawl at same time.... I dont want to remove it because it is a good transport. I thought when you are holding a knife it would make you go fast when crawling. Is this possile, if so how?

Thanks a lot!

New question. trying to make a soldier spawn on a vehicle. I WANT THIS SERVER SIDE!

Code: Select all

ObjectTemplate.create SpawnPoint Sub7CDriverSoldierSpawn
I found this, somthing like this. Maybe attach it to the goblinscomplex. If so how... i want to attach it to a goblin. Any ideas??

Thanks :D

Re: Changing soldiers speed.

Posted: Sat Jan 23, 2010 11:30 am
by Senshi
Searching helps. Sprint codes are covered here:
http://bfmods.com/viewtopic.php?f=43&t=20

I you want to tie movement speed to a weapon, you would need to create a unique lower body movement animation, assign it to the weapon specifically so you can change its speed. Currently BF42 has animations split in two segments, Upperbody(hip upwards) and Lowerbody (legs). UpperBody varies depending on each weapon, but lowerbody has been coded "multipurpose" to save animation work. Every animation "Run" uses different upperbody animations, but the same lowerbody. If you create a unique animation, you can assign it to the "Crawl" movement of the knife and change its speed uniquely.

Doubt that will work SSM, however.

Re: Changing soldiers speed.

Posted: Sat Jan 23, 2010 10:11 pm
by itsmei
any help with question 2??

Re: Changing soldiers speed.

Posted: Sun Jan 24, 2010 11:26 am
by freddy

Code: Select all

ObjectTemplate.Active Sub7CComplex
ObjectTemplate.removeTemplate 4

Code: Select all

ObjectTemplate.Active Goblin
ObjectTemplate.addTemplate Sub7CDriverSoldierSpawn
spawn the sub somewhere in the map or it doesnt work

Re: Changing soldiers speed.

Posted: Sun Jan 24, 2010 3:06 pm
by itsmei
does it matter that i have the demo version and i can't actually spawn it?

Re: Changing soldiers speed.

Posted: Sun Jan 24, 2010 3:14 pm
by itsmei
I tried to spawn it and it didn't let me becuase demo, then i tried to spawn

Code: Select all

Sub7CDriverSoldierSpawn
That didn't work. Is there a way of using a spawn point which is stationary?

Thanks

Re: Changing soldiers speed.

Posted: Sun Jan 24, 2010 7:02 pm
by freddy
itsmei wrote: Is there a way of using a spawn point which is stationary?

Thanks
try add it to a wehicle, it think it should work

Re: Changing soldiers speed.

Posted: Mon Jan 25, 2010 6:26 pm
by itsmei
Ok i found this: is this the right thing to do?

ObjectTemplate.Active Goblin
ObjectTemplate.addTemplate SpawnPoint Axis_Village_1

I found that here:

Code: Select all

ObjectTemplate.create SpawnPoint Axis_Village_1
ObjectTemplate.setSpawnId 40
ObjectTemplate.setGroup 7


Do i need to add somthing like this like you said earlier?

Code: Select all

ObjectTemplate.Active Sub7CComplex
ObjectTemplate.removeTemplate 4
Thanks :D

Re: Changing soldiers speed.

Posted: Tue Jan 26, 2010 3:59 am
by freddy
itsmei wrote:Ok i found this: is this the right thing to do?

ObjectTemplate.Active Goblin
ObjectTemplate.addTemplate SpawnPoint Axis_Village_1

I found that here:

Code: Select all

ObjectTemplate.create SpawnPoint Axis_Village_1
ObjectTemplate.setSpawnId 40
ObjectTemplate.setGroup 7
that looks ok, try it out!
itsmei wrote: Do i need to add somthing like this like you said earlier?

Code: Select all

ObjectTemplate.Active Sub7CComplex
ObjectTemplate.removeTemplate 4
Thanks :D
no your not using the subspawn so that shouldnt be nessesary, that Axis_Village_1 SpawnPoint is already defined in the map.

one thing tho, ivé never modded the demo myself so cant swear that it works. you just have to try different stuff to you get it. also thats the best way to learn :)

Re: Changing soldiers speed.

Posted: Tue Jan 26, 2010 2:19 pm
by itsmei
OK, I DID IT ! ! !

Here is how......

I got all the spawn points and added them to a goblin:

Code: Select all

ObjectTemplate.Active Goblin
ObjectTemplate.addTemplate Axis_Village_1
ObjectTemplate.addTemplate Axis_Village_2
ObjectTemplate.addTemplate Axis_Village_3
ObjectTemplate.addTemplate Axis_Village_4
ObjectTemplate.addTemplate Axis_Village_5
ObjectTemplate.addTemplate Axis_Village_6
ObjectTemplate.addTemplate Axis_Village_7
Then i went to soldierspawn and removed all this:

Code: Select all

Object.create Axis_Village_1
Object.absolutePosition 389.701/70.8443/309.161
Object.rotation 0/0/9.88312e-006
rem
rem ***  ***
rem
Object.create Axis_Village_2
Object.absolutePosition 350.31/61.9466/246.644
Object.rotation 0/0/9.88312e-006
rem
rem ***  ***
rem
Object.create Axis_Village_3
Object.absolutePosition 367.933/61.6873/250.275
Object.rotation 0/0/9.88312e-006
rem
rem ***  ***
rem
Object.create Axis_Village_4
Object.absolutePosition 362.71/67.5433/291.625
Object.rotation 0/0/9.88312e-006
rem
rem ***  ***
rem
Object.create Axis_Village_5
Object.absolutePosition 414.511/73.14/296.362
Object.rotation 0/0/9.88312e-006
rem
rem ***  ***
rem
Object.create Axis_Village_6
Object.absolutePosition 381.286/68.8248/294.572
Object.rotation 0/0/9.88312e-006
rem
rem ***  ***
rem
Object.create Axis_Village_7
Object.absolutePosition 394.602/72.2185/294.367
Object.rotation 0/0/9.88312e-006
And now it works :D

Thanks for your help :)