Scenario Editor Ship speed at scenario start

Post new mods and scenarios here.

Moderator: MOD_Command

Post Reply
morphin
Posts: 756
Joined: Fri Apr 26, 2002 6:51 pm
Location: Switzerland

Scenario Editor Ship speed at scenario start

Post by morphin »

Hi
I can not manage to set ship speed other then 0 at scenario start... How do i do this after insertin "Add Unit" to the scenario?
Thank's a lot
Kushan04
Posts: 1237
Joined: Tue Jun 28, 2005 9:27 pm
Location: USA
Contact:

Re: Scenario Editor Ship speed at scenario start

Post by Kushan04 »

Ships added via the GUI will always starts at 0. I'll usually run the scenario for a few seconds to get it up to speed, then reset the position if necessary.

Can also use lua to add the unit, and add the speed parameter. That's how I normally place units these days.
morphin
Posts: 756
Joined: Fri Apr 26, 2002 6:51 pm
Location: Switzerland

Re: Scenario Editor Ship speed at scenario start

Post by morphin »

Thank's.

Ok so with ScenEdit_SetUnit({guid='NW4XCU-0HMT3TG6MBRAK', Speed='20'}) i can set the speed.
Thank's Kushan
morphin
Posts: 756
Joined: Fri Apr 26, 2002 6:51 pm
Location: Switzerland

Re: Scenario Editor Ship speed at scenario start

Post by morphin »

What would be interesting to see the range of a ship after changing the speed.
So with ScenEdit_SetUnit({guid='NW4XCU-0HMT3TG6MBRAK', Speed='20'}) i change the speed and after manually refresh the unit status window i see the new range of the ship.

->I see the data for creep,cruise, full and flank in the database viewer, but sometimes it is helpfull to see the range with a speed between creep and cruise.

Perfect would be if i can generate the range for a full range of speed(1-30) with LUA, but for this i have not found any possibility to query the db for the consumption nor i have not found a possilibilty to get the range with LUA
Kushan04
Posts: 1237
Joined: Tue Jun 28, 2005 9:27 pm
Location: USA
Contact:

Re: Scenario Editor Ship speed at scenario start

Post by Kushan04 »

morphin wrote: Wed Aug 23, 2023 7:26 pm Thank's.

Ok so with ScenEdit_SetUnit({guid='NW4XCU-0HMT3TG6MBRAK', Speed='20'}) i can set the speed.
Thank's Kushan
No need to use SetUnit unless your modifying a unit that's already been placed.

Example:
ScenEdit_AddUnit({type='ship', side='United States', dbid=2591, name='USS Harry S. truman (CVN-75)', latitude=33.5, longitude=31, speed=20})

ScenEdit_SetUnit() is called at the end of AddUnit; anything not part of AddUnit function will be passed into SetUnit.
Post Reply

Return to “Mods and Scenarios”