Does anyone have experience getting ActivateObject to work in their scripts? I need to turn on/off objects for different objectives and for some reason it just doesn't work. I've tried to use Kill/RespawnObject and SetProperty to effectively do the same thing, but the way those work is just different enough to make them unsuitable for my needs. I can add a more situational example if it helps, but basically I just need certain objects to "not exist" until triggered by an event... which is like, the textbook use of ActivateObject I'm pretty sure.
Anyway, I'd appreciate any help. Btw, nothing relevant in the error log.
Activate/Deactivate object does nothing
Moderator: Moderators
- Oceans14
- Command Sergeant Major
- Posts: 296
- Joined: Mon Apr 27, 2015 7:09 pm
- Projects :: Athenova Campaign
- Location: Planet 4546b
-
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: Activate/Deactivate object does nothing
Have you considered using CreateEntity instead?
- Oceans14
- Command Sergeant Major
- Posts: 296
- Joined: Mon Apr 27, 2015 7:09 pm
- Projects :: Athenova Campaign
- Location: Planet 4546b
Re: Activate/Deactivate object does nothing
Nope, but that looks very promising. I'll give it a shot!
-
- Second Lance Corporal
- Posts: 102
- Joined: Sun May 07, 2017 11:31 pm
- Projects :: ANF - ISM Skin Changer - BF1 Ports
- Location: Kentucky, USA
Re: Activate/Deactivate object does nothing
Pretty sure ActivateObject actually just activates the physics system for that object
- AnthonyBF2
- Sith
- Posts: 1255
- Joined: Wed Aug 21, 2013 3:55 pm
- Projects :: PS2+PSP Overhaul
Re: Activate/Deactivate object does nothing
You can also have the item alive and then use these two functions to essentially kill it:
Code: Select all
SetProperty("object", "IsVisible", 0)
SetProperty("object", "IsCollidable", 0)
- Oceans14
- Command Sergeant Major
- Posts: 296
- Joined: Mon Apr 27, 2015 7:09 pm
- Projects :: Athenova Campaign
- Location: Planet 4546b
Re: Activate/Deactivate object does nothing
Interesting! I'll have to mess around with this.Calrissian97 wrote:Pretty sure ActivateObject actually just activates the physics system for that object
I considered using IsVisible but I didn't know IsCollidable existed too - that's a game changer. Will definitely try this one as well.AnthonyBF2 wrote:You can also have the item alive and then use these two functions to essentially kill it:
Code: Select all
SetProperty("object", "IsVisible", 0) SetProperty("object", "IsCollidable", 0)
Thank you all for the advice!