car.teleport()
car.teleport()
It would be sweet if car would keep its orientation while teleportation.
And/Or teleport() could be extended with optional orientation parameter.
I try to make car with afterburner
http://youtu.be/bPkt-GR0Kio
And/Or teleport() could be extended with optional orientation parameter.
I try to make car with afterburner
http://youtu.be/bPkt-GR0Kio
Last edited by rk84 on Tue Oct 01, 2013 1:07 am, edited 1 time in total.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Re: car.teleport()
Wow, cool!
And what if you could just alter the car speed?
And what if you could just alter the car speed?
Re: car.teleport()
hehe. yea that makes more sense. Though, I could add some effects with teleport. Like vibration, if really high speed or not on road/asphalt tile. I have also thinking about possibility of a script driveable car. Teleportation probably is not that best way of doing those. So yea alterable car speed would be nice.kovarex wrote:Wow, cool!
And what if you could just alter the car speed?
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Re: car.teleport()
that looks awesome :3
Re: car.teleport()
Yea it is. I can't stop driving.ficolas wrote:that looks awesome :3
I need to make more road to north and express train to get back
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Re: car.teleport()
Where does that road come from ?
Re: car.teleport()
I made it. I copied sand tiles/terrain and edited them bit with GIMP. Then made roads with map editor, but I forgot to set asphalt to "none" in generator so there is some big areas of asphalt.Nirahiel wrote:Where does that road come from ?
Edit: game.gettile() works like a charm. I added small shake effect, when driving off road with afterburner.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Re: car.teleport()
I will add all you need to the modding intefrace to 0.7.1 so I can play with it when it is released
Re: car.teleport()
Cool. I think I can get rid of ~15 lines of code and don't need to add seperated fuel eater, if I get my hands on 1 or 2 properties. Consumption and burner.effectivity perhaps?kovarex wrote:I will add all you need to the modding intefrace to 0.7.1 so I can play with it when it is released
Teleport has one problem. The car can get stuck in water for example and I can't use "canplaceentity()" directly, because the car itself is in the way.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Re: car.teleport()
Check the tilesrk84 wrote:Cool. I think I can get rid of ~15 lines of code and don't need to add seperated fuel eater, if I get my hands on 1 or 2 properties. Consumption and burner.effectivity perhaps?kovarex wrote:I will add all you need to the modding intefrace to 0.7.1 so I can play with it when it is released
Teleport has one problem. The car can get stuck in water for example and I can't use "canplaceentity()" directly, because the car itself is in the way.
Alsp do you plan on adding a time travel or something? XD
Re: car.teleport()
I guess that could work. Even though it still can teleports inside other entities, but one of the entities will most likely die in hit so its not stuck situation.ficolas wrote:Check the tiles
Yea mayby I use wormholesficolas wrote:Alsp do you plan on adding a time travel or something? XD
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Re: car.teleport()
If you want the car to go faster, just mess with the 'acceleration per energy' line, or that one and the friction lines if you want to change how far it coasts. (Both in the car's definition in entities.lua)
I'd also consider changing the rate of fuel consumption for the increased speed, higher for faster but expensive trips, or lower for slower but more economic.
Be very wary of making these adjustments, as the car's durability, if below near-limitless amounts, means it's usually a one use vehicle for speeds significantly above stock values.
In either case, *don't* use anything remotely close to .01 for the accel value, assuming you want to have any sort of reaction time.
Values above that will test theoretical limits of the game engine to render light speed
I'd also consider changing the rate of fuel consumption for the increased speed, higher for faster but expensive trips, or lower for slower but more economic.
Be very wary of making these adjustments, as the car's durability, if below near-limitless amounts, means it's usually a one use vehicle for speeds significantly above stock values.
In either case, *don't* use anything remotely close to .01 for the accel value, assuming you want to have any sort of reaction time.
Values above that will test theoretical limits of the game engine to render light speed
Re: car.teleport()
Yup thats what I'm after. Afterburner is inefficient in terms of fuel consumption.n9103 wrote:...consumption for the increased speed, higher for faster but expensive trips...
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Re: car.teleport()
So slightly decrease the accel number and significantly increase the consumption?
You'll get a faster but much less efficient car.
If you're looking into making a triggered/on demand speed boost, can't say I can help, since there isn't any action key that you might be able to map to triggering the speed boost.
If you're just looking for an alternative/accessory to the normal car, that you could swap into without much of a problem, I think you can create it now, with only needing new graphics.
You'll get a faster but much less efficient car.
If you're looking into making a triggered/on demand speed boost, can't say I can help, since there isn't any action key that you might be able to map to triggering the speed boost.
If you're just looking for an alternative/accessory to the normal car, that you could swap into without much of a problem, I think you can create it now, with only needing new graphics.
Re: car.teleport()
So I added 3 modifier to the car, that will be available in 0.7.1, I hope it is all needed, looking forward to get hands on your mod
https://forums.factorio.com/wiki/inde ... le=Lua/Car
https://forums.factorio.com/wiki/inde ... le=Lua/Car
Re: car.teleport()
Could send or explaine to me the code on how you made a new tile. or did you just replace the sand ?rk84 wrote:I copied sand tiles/terrain and edited them bit with GIMP.
and did you put the new tile in the "_base_" or in the "mod" folder ?
Re: car.teleport()
Copy the prototype of the tile, add it to a lua file with data:extend, and include it in your data.lua file as you do with any other entity/item/ w/e prototype.Math3vv wrote:Could send or explaine to me the code on how you made a new tile. or did you just replace the sand ?rk84 wrote:I copied sand tiles/terrain and edited them bit with GIMP.
and did you put the new tile in the "_base_" or in the "mod" folder ?
Re: car.teleport()
Got to see this thread just now. It looks super awesome!
Re: car.teleport()
Yay. I can't wait for 0.7.1kovarex wrote:So I added 3 modifier to the car, that will be available in 0.7.1, I hope it is all needed, looking forward to get hands on your mod
https://forums.factorio.com/wiki/inde ... le=Lua/Car
Yes. I copied from "\data\base\prototypes\tile\tiles.lua". If you want generator to use your tiles you need to define noise-layer too like in "noise-layers.lua". If not then you can remove the generator table from tile definition.ficolas wrote:Copy the prototype of the tile, add it to a lua file with data:extend, and include it in your data.lua file as you do with any other entity/item/ w/e prototype.Math3vv wrote:Could send or explaine to me the code on how you made a new tile. or did you just replace the sand ?rk84 wrote:I copied sand tiles/terrain and edited them bit with GIMP.
and did you put the new tile in the "_base_" or in the "mod" folder ?
Thanks.slpwnd wrote:Got to see this thread just now. It looks super awesome!
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela