im trying to make a object get destroyed when I’ve hit a speed, pizza tower style, tho i don’t know the code that i would need to do this, can anyone help
if its platform object you can type the object name and then dot and then speed and platform object horizontal speed should come up - but you’ll need to wrap it up in abs() as it might be negative.
so use compare two number abs(object.PlatformerObject::CurrentSpeed())>destrospeed
So i just wanna make sure, object is player?
hi lewis - yes if thats the object that you want to destroy.
hey, so ive tried many ways to type this code though nothing seems to work
![]()
Hi Lewis - you need to take the 200 out of the brackets and have it on the otherside of the equation. You also need to have it inside abs() which turns negative numbers positive since the current speed will be negative when going left
![]()
Alright thanks I’ll try
Ok what behaviours have you got attached to the object?
In the search it comes up as platform character behaviour
I know what’s going on…I miss understood …you want the platform to break when you’re on it trying a certain speed …right hand on code coming…
![]()
sorry - thought you wanted something to be destroyed when going a certain speed …this’ll work - it’ll destroy the platform that the charcter is on!
it’s fine, and I’ll try the new code out
thank you so much it worked, that helps so much.
side question how would i convert the code so it can work when running into something like this
thats great - sorry for the confusion at first - i thought you wanted the object that was travelling at speed to get destroyed. - should have realised sooner! looks great!
thanks, and its alright i feel i was not that clear
, think you help with the second question


