PROBLEM SOLVED !!
Terrain can be made PASSABLE - also INVISIBLE.
The falling sphere is used just for 'something' to change and trigger the terrain action.
This is the new code - it may help someone (I hope!);-
#include <acknex.h>
#include <default.c>
#include "t_player.h"
//////////////////////////////
ENTITY* player="t_player";
ENTITY* terrain = "tester.hmp";
ENTITY* sphere = "ball.mdl";
function main()
{
level_load("xc1.WMB");
}
action down() //attached to sphere (drops to z-16 to make terrain passable and invisible)
{
while(sphere.z>-16)
{
sphere=me;
sphere.z -= 3*time_step;
wait(1);
}
{
wait(-2); //needed to stop 'judder'
terrain=me;
set(my,INVISIBLE); //needed to stop flash of light as //player drops through terrain
set(terrain,PASSABLE);
}}
Probably not very elegant, but it works. Got it by 'fiddling about' a lot - I felt it should work somehow.
David
NEW - FOUND A BETTER WAY!
remove:-
wait(-2); and set(my,INVISIBLE); and set(terrain,PASSABLE);
then replace with:-
ptr_remove(me);
Much cleaner and it works - hope it helps
David
PS. This is used for player who crosses terrain to tower in middle - enters tower - sets code and drops through to cave system below.
Last edited by DAVIDMORETON; 04/20/18 10:15.