![]() |
![]() |
![]() |
![]() |
January 31st, 2006, 08:55 AM
|
#1 |
|
Commander Keen
Join Date: Apr 2004
Location: Spain
Posts: 4,344
|
FS: Possible FS additions.
When Legacy V2.0 is out surely FS and the BEX extensions will be used to make new weapons. Regarding this I´ve thought about a couple of modifications to the functions that, if possible to be coded, could add more possibilities to Legacy.
-The Lineattack function will be surely used for a lot of new firearms but it doesn´t work for melee weapons that should duplicate the chainsaw or fist effect. I suggest adding a "distance" parameter to the function so melee weapons can be done too. As far as I know, the original Doom fist is a lineattack weapon with a limited range. -The Spawnmissile function will also allow for new weapons and works right as it is. Still, if something could be added it would be a "spawner" parameter: I seem to remember that some projectile weapons in Doom can´t harm the one who fires them (plasma gun) and it would be nice to make this effect possible with custom weapons too. I don´t know the difficulty for this. And I think that´s all... Well, the only thing that´s missing is a railgun and then some function to spawns a projectile that doesn´t dissapear when impacts the enemy. Now that I think about that, it could be interesting: it could keep hurting until the health of the projectile is completely depleted (that would be achieved by hurting things or after a given period of time)... Clouds of venom and "railgun projectiles" could be done with this. Anyway, I just wanted to point the two above. |
|
|
January 31st, 2006, 01:22 PM
|
#2 |
|
Commander Keen
Join Date: Sep 2004
Location: Chile, Southamerica
Posts: 56
|
Mmmm, railgun sucks, im happy that doom doesnt have one
|
|
|
January 31st, 2006, 09:28 PM
|
#3 | |
|
Commander Keen
Join Date: Jul 2000
Location: Sweden
Posts: 422
|
Quote:
|
|
|
|
February 1st, 2006, 02:44 AM
|
#4 | |
|
Commander Keen
Join Date: Apr 2004
Location: Spain
Posts: 4,344
|
Quote:
Right now you can emulate only the functioning with scripting, but nothing less. If Legacy was to have a custom weapons system, would it be embedded inside FS or would it be another kind of system like an extended table?... I don´t know, but a simple and effective way to do it would be as following: { weapon = 06 // For example, the number. bobbing01 = ("Handgun01", 2 , 0) // The graphic lump, duration and sideeffects. If no sideffect specified, the state passes to the next. bobbing02 = ("Handgun02", 2, 0) bobbing03= ("Handgun03, 2, bobbing1) // If sideeffect = frame that frame is called. firing01 = ("Hangunfir01", 4, startscript(1)); //Again, graphic lump, duration and sideffect (call script 1). firing02 = ("Handgunfir02", 2, startscript(2)); firing... //Etc... Lower, Raise and other weapon states should be called. In addition, some "customstates" could be done for custom stuff like weapon reloading, secondary fires and things like that... These custom states would be called only from scripting. } script 1 { if (x != 0) // Given x as ammo. { callweaponframe(6, firing02); //If there´s ammunition the weapon number 6 proceeds to the second firing frame. } else { callweaponframe(6, bobbing01); //If there´s not, we get back to the bobbing frame. } } script 2 { callstate("LIGHT1"); // Lits up the room when firing. x=x-1; //Substracts ammo. lineattach(blahblah); //Attack itself. playsound("BLAH"); // Sound of the weapon. } You see, first there´s the definitions and then we create the effects and working with scripts. For example, this weapon works in a simple way: if there´s ammo it fires and lits the room, if not it goes back to bobbing frames... Need functions (like callstate, callweaponframe and stuff) would be needed along with lot of other things for this system to work but well, this is just a suggestion or inspiration .
|
|
|
|
February 1st, 2006, 05:34 AM
|
#5 | |
|
Keen For Life
Join Date: Jan 2002
Location: Elsewhere
Posts: 287
|
Quote:
weaponx = cos(playerangleinrads) * distance from player + playerx weapony = sin(playerangleinrads) * distance from player + playery |
|
|
|
February 1st, 2006, 05:46 AM
|
#6 |
|
Commander Keen
Join Date: Apr 2004
Location: Spain
Posts: 4,344
|
Yeah, that can be made and you can also spawn a node just a little more distance away to be the target for the missile spawned. What I meant with a spawned parameter was that the missile (projectile) would never harm you if you shoot it and collide with it.
We al know missiles hurt the player that launchs them but plasma and BFG shots don´t (you can do a large hallway with teleporters in each side and check yourself) so you´re invulnerable to your own weapons. If you spawn those with FS you´re bound to be harmed by them so to avoid that you could use a "spawner" parameter. Anyway, that should be hard to code. It really can sound pointless since the player never gets to reach his own plasma balls but I don´t know, you can script plasma balls that circle around the player or something and those would hurt. The whole purpose of that parameter would be to "emulate" the original Doom behaviour (supposing it´s easy to implement and worth the effort). |
|
|
February 14th, 2006, 09:03 AM
|
#7 |
|
Commander Keen
Join Date: Apr 2004
Location: Spain
Posts: 4,344
|
I just thought... With any user-made projectile weapon (assuming it´s done with FS) the whole multiplayer and deathmatch thing would be harder to script, but possible but... How would you recognise who killed someone with an user-made projectile weapon so he gets the frag?. Using the player as the spawn point?.
|
|
|
February 14th, 2006, 02:38 PM
|
#8 |
|
Commander Keen
Join Date: Jul 2000
Location: Sweden
Posts: 422
|
Why not just add Decorate?
|
|
|
February 14th, 2006, 02:49 PM
|
#9 |
|
Commander Keen
Join Date: Apr 2004
Location: Spain
Posts: 4,344
|
I´m sure that most people would agree and second that but I´m not sure if it´s a priority or even an objective for the Legacy team. Also, wouldn´t DECORATE need to add an extended thing table or something?. With Hexen on the works it could be a little messy if not planned right.
|
|
|
February 14th, 2006, 04:56 PM
|
#10 |
|
Keen For Life
Join Date: Jan 2002
Location: Elsewhere
Posts: 287
|
The projectile's target should be the monster or player that fired the missile.
|
|
|
February 14th, 2006, 05:32 PM
|
#11 |
|
Commander Keen
Join Date: Apr 2004
Location: Spain
Posts: 4,344
|
Does that identify in the "Spawnmissile" as the source of the missile?. Wouldn´t that make rockets explode in the mouth of the players?.
|
|
|
February 14th, 2006, 05:52 PM
|
#12 | |
|
Commander Keen
Join Date: Jul 2000
Location: Sweden
Posts: 422
|
Quote:
|
|
|
|
February 14th, 2006, 06:06 PM
|
#13 |
|
Keen For Life
Join Date: Jan 2002
Location: Elsewhere
Posts: 287
|
In the FS command, the trigger of the script is used as the creator of the missile. So if you're spawning the projectiles from a script started with "startscript" then they should belong to player 1.
|
|
|
February 14th, 2006, 06:19 PM
|
#14 | ||
|
Commander Keen
Join Date: Apr 2004
Location: Spain
Posts: 4,344
|
Quote:
Quote:
Finally, wasn´t there a bug that crashed Legacy when you spawned a lot of things?. Wouldn´t it happen too with spawned projectiles?. |
||
|
|
February 15th, 2006, 06:43 AM
|
#15 |
|
Keen For Life
Join Date: Jan 2002
Location: Elsewhere
Posts: 287
|
The problem with spawn is that it creates a mapthing (defines where a monster/item spawns at map load) to prevent respawning monsters from crashing (since they need to start where they were first spawned). However, when you remove an object, it doesn't free the memory that's taken up by the mapthing.
I don't believe spawnmissile has this problem since projectiles aren't respawned. And the as long as the codepointer correctly assigns the trigger of the script as the object that called it, everything should work okay (in theory). |
|
|
February 15th, 2006, 07:12 AM
|
#16 |
|
Commander Keen
Join Date: Apr 2004
Location: Spain
Posts: 4,344
|
Darkwolf, I remember you told me that you introduced the setobjposition function in FS precisely to find a route around this problem (or so I think)... Do you think it could be possible to fix it and, if possible, do you think it would be in V2.0?. I tend to think that all problems in v1.42 will be fixed by rewriting the whole code (fun it´s said in other thread that Legacy is dead) but I´m not sure about which ones could be fixed. Maybe I should try to learn coding so I can be useful in a few years.
|
|
|
February 15th, 2006, 03:25 PM
|
#17 |
|
Join Date: Oct 2005
Location: Unknown
Posts: 1,330
|
The one thing I'd really like to see in FraggleScript is functions since it gets VERY messy with globals.
|
|
|
February 15th, 2006, 07:33 PM
|
#18 |
|
Keen For Life
Join Date: Jan 2002
Location: Elsewhere
Posts: 287
|
There are a few different ways it could be addressed. Hopefully the problem won't translate into v2.0.
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Few additions for JDoom.. | Mr. Chris | Doomsday | 0 | November 20th, 2002 03:50 PM |
| Role playing additions | Hunt1024 | DOOM Series | 2 | June 21st, 2001 01:55 AM |