Is it possible to change 'view' variable for object itself?
Especially in nml?
For example, to adjust view according to nearby tiles variables?
Or it can be done only during object placement?
I want to place 'fake rivers' (streams objects) and adjust their views automatically according to the neighbouring stream tiles (their existence and view),
to get chain of properly oriented stream tiles.
writable access to object 'view' variable
Moderator: Graphics Moderators
writable access to object 'view' variable
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: writable access to object 'view' variable
The view variable is a choice the player makes.
Evaluate the neighbouring tiles type and object grfid to an integer value and select the appropriate sprite(s) in a switch according to the number you got in your evaluation.
Or do that more simple and draw four riverbank sprites on top of a plain water, depending on the adjacent tile. you then could basically copy the code from the fence placement in OpenGFX+Landscape for the 'company land': http://dev.openttdcoop.org/projects/ogf ... _land.pnml
cheers,
pm
Evaluate the neighbouring tiles type and object grfid to an integer value and select the appropriate sprite(s) in a switch according to the number you got in your evaluation.
Or do that more simple and draw four riverbank sprites on top of a plain water, depending on the adjacent tile. you then could basically copy the code from the fence placement in OpenGFX+Landscape for the 'company land': http://dev.openttdcoop.org/projects/ogf ... _land.pnml
cheers,
pm
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Who is online
Users browsing this forum: No registered users and 18 guests