Scripts / Destroy 1 to destroy All ? & Destroy 1 to Win ?

Author
Message
ShN33Ky
Game Guru Backer
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: San Clemente ca.
Posted: 18th Feb 2017 00:17
Hi Gurus.....

long time no see to a lot of you I hope your all well! I have a little down time and still trying to work on my submarine game so just wondering if anybody can help with a couple of solutions!

1: Any way to destroy all enemy's on map by destroying One specific ai-entity?

and/or

2:Any way to "Win-game" by destroying again "1-specific ai-entity"?

just asking.....did a lot of searching and not seeing much! I would like to do this with out trigger-zones but i'll take what I can get!

TY
sHn33Ky
Processor: Intel(R) i7-4700MQ CPU @ 2.40GHz 2.40 GHz Installed memory (RAM): 16.0 GB (15.8 GB usable) System type: 64-bit Operating System,x64-based processor

Start the day by righting your wrongs then end you day right so you don't have to do it again tomorrow ...

sHn33Ky
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 19th Feb 2017 19:58
Firts at all you need some boss, in the setting vid you can see the boss I'm using for.
I'm going to post the easies way to do, so simple for you understand how it work, when you are familiar with, sure you can improve it; there are most complex way to do so, anyway better start from the begining.

Notice array holding the soldiers ids:



So there you could replace the number for your enemies numbers(ids), mouseover the soldier in editor, and you can see their id at the bottom of the screen, in the stats bar.

Attach this script to your boss



And this other to an dynamic entity and make it always active = Yes.



Maybe not what tou are looking for, but it's a good start point.
When you are so familiar with, maybe you can write some loop to know the soldier numbers (ids), without to have to enter yourself by hand.

Settings



in action



hth

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
ShN33Ky
Game Guru Backer
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: San Clemente ca.
Posted: 20th Feb 2017 23:36
Thank you so much 3Com this looks awesome butt I'm getting errors in both scripts!!! Am I suppose to enter the # of characters I want to die on either or both scripts? (What line mite that be?) ....and am I to re-name all characters linked to the Boss with #'s 1,2,3 etc....???

appreciate the help Amigo!!
Processor: Intel(R) i7-4700MQ CPU @ 2.40GHz 2.40 GHz Installed memory (RAM): 16.0 GB (15.8 GB usable) System type: 64-bit Operating System,x64-based processor

Start the day by righting your wrongs then end you day right so you don't have to do it again tomorrow ...

sHn33Ky
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 21st Feb 2017 16:18
My above post has all the answers you are looking for.

Quote: "Am I suppose to enter the # of characters I want to die on either or both scripts? (What line mite that be?)"


Quote: "Notice array holding the soldiers ids:

Ent_id[1] = 4 -- if your enemy is number (id) 10 , so type 10 instead of 4, and so on.
Ent_id[2] = 5
Ent_id[3] = 6

So there you could replace the number for your enemies numbers(ids), mouseover the soldier in editor, and you can see their id at the bottom of the screen, in the stats bar."


Quote: "and am I to re-name all characters linked to the Boss with #'s 1,2,3 etc....??? "

No. in fact you don't has to touch soldier script, just do what I'm pointing above.

3com


Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
ShN33Ky
Game Guru Backer
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: San Clemente ca.
Posted: 24th Feb 2017 20:25
Sorry 3com but still cant seem to figure this out....

Processor: Intel(R) i7-4700MQ CPU @ 2.40GHz 2.40 GHz Installed memory (RAM): 16.0 GB (15.8 GB usable) System type: 64-bit Operating System,x64-based processor

Start the day by righting your wrongs then end you day right so you don't have to do it again tomorrow ...

sHn33Ky
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 25th Feb 2017 18:07
Try my map.

3com


Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

Attachments

Login to view attachments
PM
ShN33Ky
Game Guru Backer
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: San Clemente ca.
Posted: 1st Mar 2017 04:02
Thanks 3Com it's working great.....it was basically me! For some reason when I copy scripts from here in the forum and paste them into my lua editor things don't line up right!

thanks again great script....
Processor: Intel(R) i7-4700MQ CPU @ 2.40GHz 2.40 GHz Installed memory (RAM): 16.0 GB (15.8 GB usable) System type: 64-bit Operating System,x64-based processor

Start the day by righting your wrongs then end you day right so you don't have to do it again tomorrow ...

sHn33Ky
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 1st Mar 2017 09:07
Copying and pasting from the code box here is broken, it adds invisible characters at the end of lines, always download the script from attachments if you can, if not then type it manually, just don't copy paste.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 1st Mar 2017 15:19
@ ShN33Ky
Your welcome.

Quote: "Copying and pasting from the code box here is broken, it adds invisible characters at the end of lines"

Nice to know. hereafter I'll try to zipped code and attach it.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM

Login to post a reply

Server time is: 2024-04-25 21:58:09
Your offset time is: 2024-04-25 21:58:09