Changing soldiers speed.

Ask questions, discuss ideas, get answers
itsmei
Posts: 9
Joined: Thu Jan 14, 2010 7:05 pm

Changing soldiers speed.

Post 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
Last edited by itsmei on Sat Jan 23, 2010 4:44 pm, edited 2 times in total.
Image
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: Changing soldiers speed.

Post 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.
itsmei
Posts: 9
Joined: Thu Jan 14, 2010 7:05 pm

Re: Changing soldiers speed.

Post by itsmei »

any help with question 2??
Image
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Changing soldiers speed.

Post 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
itsmei
Posts: 9
Joined: Thu Jan 14, 2010 7:05 pm

Re: Changing soldiers speed.

Post by itsmei »

does it matter that i have the demo version and i can't actually spawn it?
Image
itsmei
Posts: 9
Joined: Thu Jan 14, 2010 7:05 pm

Re: Changing soldiers speed.

Post 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
Image
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Changing soldiers speed.

Post 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
itsmei
Posts: 9
Joined: Thu Jan 14, 2010 7:05 pm

Re: Changing soldiers speed.

Post 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
Image
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Changing soldiers speed.

Post 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 :)
itsmei
Posts: 9
Joined: Thu Jan 14, 2010 7:05 pm

Re: Changing soldiers speed.

Post 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 :)
Image
Post Reply