Cutstuff Home
CMM's Twitter
MM8BDM Wiki
ZDoom Wiki
Zandronum
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
Advanced Search
Cutstuff Forum
»
Mega Man 8-bit Deathmatch
»
Help & Editing
»
Help with some actors...
Print
Pages: [
1
]
Author
Topic: Help with some actors... (Read 1993 times)
0 Members and 1 Guest are viewing this topic.
November 30, 2014, 02:02:39 AM
Read 1993 times
Hilman170499
MM8BDM Extender
BLUE FOR DAYS!!!
>
Date Registered: March 18, 2012, 05:49:26 AM
Help with some actors...
«
on:
November 30, 2014, 02:02:39 AM »
Hey guys, I'd like some help on how to make a few things, just to know:
1) How do you make an item that spawns in an entity that follows the user around and attacks anyone in close proximity(keyword: close proximity, Beat just attacks whenever you fire), but only lasts for a bit?
2) An item that spawns in a thing that flies around and attacks anyone who is not the summoner, but lasts for a bit too.
Thanks in advance.
Logged
November 30, 2014, 02:11:29 AM
Reply #1
Russel
MM8BDM Extender
Doc Croc
>
>
>
>
>
>
>
>
>
>
Date Registered: December 17, 2010, 11:11:25 PM
guess this is what it's like writing algorithms in paragraph
«
Reply #1 on:
November 30, 2014, 02:11:29 AM »
1) This is a bit complex, I'll get back to you on that, will edit when I think of a good thing.
EDIT: Alright...um.
Beat Support works by spawning an actor that constantly gives items that spawn the beat visual effects to its target [the player] and executes a script that loops and checks for the fire button being pressed. That's all it does.
I came up with two methods, stopped writing out the more complex one.
(click to show/hide)
[This got stupid, ignore this, kept for other's reference.] This would be different. The only things that would be the same are the use of a script and actor that gives stuff to its target. What the script does and the visual effects used will be drastically different.
The script here would need to check the distance between the player activating it and all players in the game, then fire a shot at the closest player if they are in a radius closer to you than a certain distance. This is where it gets complex. In order to do this, you would need to loop through all the players currently in the game, not including the player who activated the script, check the distances between them and the activating player, recording the distance to a variable if they are within a radius and that distance is smaller than the previous recording and recording the thing ID of the player to another variable.
After the thing ID recording is finished, use the function VectorAngle to record the angle between the player and the target, and fire a projectile in that direction.
Method two:
(click to show/hide)
Spawn a monster similar to treble, use a script to give it a unique thing ID and move it on top of the target player every tic until it dies. This is far easier than the above method because it doesn't require you to write a new targetting method. Simply execute a script on the summoned monster to give it a unique thing ID [similar to the thunder claw pegs in GLOBAL, but with different numbers] then have the script acquire the target thing ID and save both the unique thing ID and the target thing IDs to two different variables. While the monster is still active, [guts lifts do that by checking for cutterflag] move the monster's thing ID on top of the player's by using Thing_Move. Make sure the monster starts with the MISSILE and NOCLIP flags. Disable the MISSILE flag a few tics after the script is executed. Make sure the script is executed using ACS_ExecuteAlways.
2) Treble is this, but just doesn't move. Make a treble clone, give it a speed above zero, and call A_Chase to make it move.
EDIT: The MMSP monsters are better examples, more specifically the Joe scouts. If you give them the flag +FRIENDLY, they won't attack the one that summoned them.
Logged
Print
Pages: [
1
]
Cutstuff Forum
»
Mega Man 8-bit Deathmatch
»
Help & Editing
»
Help with some actors...