If you set the 'vehicle" field of a train to character, the character will disappear and will stop colliding, but in any other respect it'll still be considered staying there.
If the char was enemy, you'll be able to shoot at that empty space for damage.
If you force it out of train by script, it'll appear near to where it was loaded into train.
If character had active equipment, it'd act as if the character is still staying there.
[0.12.10] Sript doesn't actually put character in vehcle.
[0.12.10] Sript doesn't actually put character in vehcle.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: [0.12.10] Sript doesn't actually put character in vehcle.
Could you please post here exact commands you are using in the script to set vehicle field? As far as I know the field is read only and can't be written to.
Re: [0.12.10] Sript doesn't actually put character in vehcle.
The help method report "passenger" field of vehicle to be [RW]
Commands used were like this: (train was built earlier)
Then target marker would still point the former position of enemy character. And it'll still be there in any respect except for collision and drawing. The game only updates character position when it's controlled by player.
It would be nice to actually have this ability.
Commands used were like this: (train was built earlier)
Code: Select all
/c surf=game.get_surface(1); player=game.player;
/c pos=game.player.position;
/c ents=surf.find_entities_filtered{area={{pos.x-1,pos.y-1},{pos.x+1,pos.y+1}},type='locomotive',force=game.forces.enemy}
/c surf.create_entity{name='player',position=player.position,force=game.forces.enemy}
/c ents[1].passenger=p
It would be nice to actually have this ability.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: [0.12.10] Sript doesn't actually put character in vehcle.
Thanks for the report. This is now fixed for 0.12.11.
If you want to get ahold of me I'm almost always on Discord.