Raised This Month: $32 Target: $400
 8% 

restrict terros from planting the bomb on 1 site of 2??


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 03-17-2022 , 13:54   restrict terros from planting the bomb on 1 site of 2??
Reply With Quote #1

tl;dr
Hi! I'm planning to make some sort of wingman on amxx. What I wanted is just restrict terros from planting the bomb on randomly picked site on the round start. So there will be 1 site to go to. And I came to a variant where i just select random func_bomb_target entity on round start and then remove it. On next round I could just create new func_bomb_target instead of removed one and pick the random site again and so on...

BUT here appears the main problem: bombsite is NOT just a cube entity. As example: B site on de_dust2. We have green box near the "b plat" and u can't just plant the bomb where u want on it. If I will just spawn new func_bomb_target there I could plant the bomb even where i couldn't do it before. (hope you understand what I mean by that green box)


So... is there any other good way to restrict terros from planting the bomb on randomly picked site on round start?

No doubt my (is it?) idea sounds like a shit but i wanna give it a try
__________________
Now working on: Side Weapons (Very lazy, tbh)
Avatar source: https://bit.ly/3BAk19g
Discord: kww#9951

Last edited by kww; 03-17-2022 at 14:08.
kww is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 03-17-2022 , 15:18   Re: restrict terros from planting the bomb on 1 site of 2??
Reply With Quote #2

You don't need to remove the entity you can just simply move it in the void, and set it back.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 03-17-2022 at 15:19.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 03-17-2022 , 15:24   Re: restrict terros from planting the bomb on 1 site of 2??
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
You don't need to remove the entity you can just simply move it in the void, and set it back.
I've thought about that. Seems very ok if gonna play without bots. But what if some bot with the bomb will just stuck in the closest position to the moved bombsite if he decide to go to it? I don't know why it came to my mind
__________________
Now working on: Side Weapons (Very lazy, tbh)
Avatar source: https://bit.ly/3BAk19g
Discord: kww#9951

Last edited by kww; 03-17-2022 at 15:28.
kww is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 03-17-2022 , 20:34   Re: restrict terros from planting the bomb on 1 site of 2??
Reply With Quote #4

Finite possibilities remain. How did changing the ent class work out?
__________________
DJEarthQuake is offline
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 03-18-2022 , 00:43   Re: restrict terros from planting the bomb on 1 site of 2??
Reply With Quote #5

Quote:
Originally Posted by Natsheh View Post
You don't need to remove the entity you can just simply move it in the void, and set it back.
For some reason if I change its origin (even back to the original position) I can't plant the bomb there anymore. Or changing an origin is not what I should do?
Or i doing it wrong?

I made it wrong way...
Possibly I have to resize it or what?

Left - before changes; right - after changes:
Code:
Entity 48                                               Entity 48
EV_INT_solid = 1                                        EV_INT_solid = 1
EV_INT_effects = 128                                    EV_INT_effects = 128
EV_INT_modelindex = 17                                  EV_INT_modelindex = 17
EV_VEC_absmin = (-1730.000000,2494.000000,-2.000000)    EV_VEC_origin = (-1536.000000,2688.000000,48.000000)
EV_VEC_absmax = (-1342.000000,2882.000000,98.000000)    EV_VEC_absmin = (-3266.000000,5182.000000,46.000000)
EV_VEC_mins = (-1729.000000,2495.000000,-1.000000)      EV_VEC_absmax = (-2878.000000,5570.000000,146.000000)
EV_VEC_maxs = (-1343.000000,2881.000000,97.000000)      EV_VEC_mins = (-1729.000000,2495.000000,-1.000000)
EV_VEC_size = (386.000000,386.000000,98.000000)         EV_VEC_maxs = (-1343.000000,2881.000000,97.000000)
EV_ENT_pContainingEntity = 48                           EV_VEC_size = (386.000000,386.000000,98.000000)
EV_SZ_classname = func_bomb_target                      EV_ENT_pContainingEntity = 48
EV_SZ_model = *16                                       EV_SZ_classname = func_bomb_target
EV_SZ_target = tgt_b                                    EV_SZ_model = *16
                                                        EV_SZ_target = tgt_b
PHP Code:
// de_dust2, b site: ent = 48
// de_dust2, a site: ent = 74

// the wrongest way as possible:
get_brush_entity_origin(entfOrigin// engine_stocks.inc: get its origin (successfully)

// but when I even set its origin to position where it sits already
entity_set_origin(entfOrigin)
// it is not working anymore

// if I set my origin there then I teleporting there successfully
entity_set_origin(idfOrigin
__________________
Now working on: Side Weapons (Very lazy, tbh)
Avatar source: https://bit.ly/3BAk19g
Discord: kww#9951

Last edited by kww; 03-18-2022 at 01:48.
kww is offline
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 03-18-2022 , 02:00   Re: restrict terros from planting the bomb on 1 site of 2??
Reply With Quote #6

Quote:
Originally Posted by DJEarthQuake View Post
Finite possibilities remain. How did changing the ent class work out?
if you mean this, then it have no effect or I do it wrong way but in entity_dump it shows me changed name instead of original:
Code:
entity_set_string(ent, EV_SZ_classname, TARGET_ENTITY_RENAMED)
So after this manipulation we still can plant the bomb, but if I rename b site on de_dust2 (maybe first created bombsite entity), then terros can't get the bomb (it just not giving on their respawn). Maybe it is ReGameDll's fault, idk
__________________
Now working on: Side Weapons (Very lazy, tbh)
Avatar source: https://bit.ly/3BAk19g
Discord: kww#9951

Last edited by kww; 03-18-2022 at 02:21.
kww is offline
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 03-18-2022 , 03:37   Re: restrict terros from planting the bomb on 1 site of 2??
Reply With Quote #7

So... I stopped at the resizing func_bomb_target entity. It should work nice for normal players, but for bots...
I think it mostly depends on bots' waypoints for maps so if they decide to plant on B then they will GO B haha
__________________
Now working on: Side Weapons (Very lazy, tbh)
Avatar source: https://bit.ly/3BAk19g
Discord: kww#9951
kww is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 03-18-2022 , 03:44   Re: restrict terros from planting the bomb on 1 site of 2??
Reply With Quote #8

I don't think moving bomb side gonna help with bot since they already mapped waypoint even ZBot.

You would need to take time remaping those if you want to make bot only plan in 1 bomb side
__________________
My plugin:

Last edited by Celena Luna; 03-18-2022 at 03:46.
Celena Luna is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 03-18-2022 , 06:07   Re: restrict terros from planting the bomb on 1 site of 2??
Reply With Quote #9

Glad you mentioned way-points. That can play a key role. Many routes are 1 way; thus bot is stuck. The other easily omitted thing that comes up is info_bomb_target and func_bomb_target are the same thing on 2 differently aged maps. You did not post all the code so leaving me to shoot in the dark on this.
__________________
DJEarthQuake is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 03-18-2022 , 06:50   Re: restrict terros from planting the bomb on 1 site of 2??
Reply With Quote #10

Quote:
Originally Posted by kww View Post
For some reason if I change its origin (even back to the original position) I can't plant the bomb there anymore. Or changing an origin is not what I should do?
Or i doing it wrong?

I made it wrong way...
Possibly I have to resize it or what?

Left - before changes; right - after changes:
Code:
Entity 48                                               Entity 48
EV_INT_solid = 1                                        EV_INT_solid = 1
EV_INT_effects = 128                                    EV_INT_effects = 128
EV_INT_modelindex = 17                                  EV_INT_modelindex = 17
EV_VEC_absmin = (-1730.000000,2494.000000,-2.000000)    EV_VEC_origin = (-1536.000000,2688.000000,48.000000)
EV_VEC_absmax = (-1342.000000,2882.000000,98.000000)    EV_VEC_absmin = (-3266.000000,5182.000000,46.000000)
EV_VEC_mins = (-1729.000000,2495.000000,-1.000000)      EV_VEC_absmax = (-2878.000000,5570.000000,146.000000)
EV_VEC_maxs = (-1343.000000,2881.000000,97.000000)      EV_VEC_mins = (-1729.000000,2495.000000,-1.000000)
EV_VEC_size = (386.000000,386.000000,98.000000)         EV_VEC_maxs = (-1343.000000,2881.000000,97.000000)
EV_ENT_pContainingEntity = 48                           EV_VEC_size = (386.000000,386.000000,98.000000)
EV_SZ_classname = func_bomb_target                      EV_ENT_pContainingEntity = 48
EV_SZ_model = *16                                       EV_SZ_classname = func_bomb_target
EV_SZ_target = tgt_b                                    EV_SZ_model = *16
                                                        EV_SZ_target = tgt_b
PHP Code:
// de_dust2, b site: ent = 48
// de_dust2, a site: ent = 74

// the wrongest way as possible:
get_brush_entity_origin(entfOrigin// engine_stocks.inc: get its origin (successfully)

// but when I even set its origin to position where it sits already
entity_set_origin(entfOrigin)
// it is not working anymore

// if I set my origin there then I teleporting there successfully
entity_set_origin(idfOrigin

Brush entities have thier own origin, if you want to set it back to its original position all you have to do is set it back to the coords 0 0 0
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode