Flying cars
#1 Posted 02 February 2017 - 02:21 PM
#2 Posted 02 February 2017 - 06:46 PM
#3 Posted 02 February 2017 - 10:16 PM
darkcaleb, on 02 February 2017 - 02:21 PM, said:
What flying cars are you talking about?
#4 Posted 03 February 2017 - 04:45 AM
Trooper Dan, on 02 February 2017 - 10:16 PM, said:
Oh sorry my bad I was talking more about the flying cars that you have seen in AMC mod, you know those that fly in the background.
#5 Posted 03 February 2017 - 06:34 AM
darkcaleb, on 03 February 2017 - 04:45 AM, said:
That must be simple trains where the sprites are moving with them.
#6 Posted 04 February 2017 - 04:28 PM
blizzart, on 03 February 2017 - 06:34 AM, said:
Yeah something like that. If you played the amc mod you will now what kind of flying cars i am talking about. These are cars that go from one place to another.(A>-------------------> or from (B>------------------->A) depends on how you see it.
#7 Posted 05 February 2017 - 12:10 AM
blizzart, on 03 February 2017 - 06:34 AM, said:
No they're not, they're just coded in to fly in a straight line when spawned.
darkcaleb; you can look inside AMCEXTRA.CON and the code for the flying cars is somewhere in there. You're welcome to use any code that's helpful.
#8 Posted 05 February 2017 - 12:14 PM
Jblade, on 05 February 2017 - 12:10 AM, said:
darkcaleb; you can look inside AMCEXTRA.CON and the code for the flying cars is somewhere in there. You're welcome to use any code that's helpful.
Thanx James, hmmm.. is it possible right with 3d models? And do i need to delete certain things about the con or?
I made a con file and just with 3 of 4 sprites wich are models, i want use as simple as possible? Anybody who can explain to me what i need and what i don't.. because i haven't played much with con coding yet.
And I included HOVERCAR.con in Game.con!
Attached File(s)
-
HOVERCAR.con (2.74K)
Number of downloads: 110
This post has been edited by darkcaleb: 05 February 2017 - 12:39 PM
#9 Posted 05 February 2017 - 04:04 PM
#10 Posted 05 February 2017 - 04:49 PM
Trooper Dan, on 05 February 2017 - 04:04 PM, said:
Well this is what been getting as an error:
warning: case mismatch: passed "HOVERCAR.CON", real "HOVERCAR.con"
Including: HOVERCAR.CON (2807 bytes)
HOVERCAR.CON: In state `SPAWNHOVERCAR':
HOVERCAR.CON:8: error: symbol `TEMP7' is not a game variable.
HOVERCAR.CON:9: error: symbol `TEMP7' is not a game variable.
HOVERCAR.CON:10: error: symbol `TEMP7' is not a game variable.
HOVERCAR.CON:11: error: symbol `TEMP7' is not a game variable.
HOVERCAR.CON:13: error: symbol `LOTAGSAVED' is not a game variable.
HOVERCAR.CON:17: error: symbol `TEMP' is not a game variable.
HOVERCAR.CON:17: error: expected a keyword but found `etactor'.
HOVERCAR.CON:17: error: expected a keyword but found `'.
HOVERCAR.CON:17: error: expected a keyword but found `'.
GAME.CON:32: error: parameter `ANULLACTION' is undefined.
GAME.CON:32: error: expected a keyword but found `0'.
Found 0 warning(s), 11 error(s).
Yes
Compiling: GAME.CON (151190 bytes)
Including: DEFS.CON (35992 bytes)
Including: USER.CON (45482 bytes)
GAME.CON:31: error: parameter `ANULLACTION' is undefined.
GAME.CON:31: error: expected a keyword but found `0'.
Found 0 warning(s), 2 error(s).
Error compiling CON files.
#11 Posted 05 February 2017 - 05:18 PM
Try adding these lines to the top:
gamevar LOTAGSAVED 0 2
gamevar TEMP7 0 0
gamevar TEMP 0 0
action ANULLACTION
Keep in mind that you are pasting in code (no I'm not looking at it) from one file that was part of a set of different CONs; declarations and possibly other code from other files in the set might be needed to make it work.
#12 Posted 05 February 2017 - 06:25 PM
#13 Posted 06 February 2017 - 02:29 PM
*This con is a copy of the one from AMC 2 mod.
*I have put a include HOVERCAR.CON in the GAME.CON file
*I'm trying to use 3d models instead of sprites.
*i not using any other con codes at this moment so, this is the only one.
*The rotation of sprites is not needed because yes, i'm using 3d models.
*And i'm trying to make use of more than one model because you don't want to see
the same thing the whole time.Variation in more cars will be needed.
Maybe i have missed something out? And this this first time i'm using con coding. This is important aspect of
the map because it would look to empty without it.
#14 Posted 06 February 2017 - 04:26 PM
This post has been edited by Mark.: 06 February 2017 - 04:28 PM
#15 Posted 07 February 2017 - 02:20 PM
Mark., on 06 February 2017 - 04:26 PM, said:
Yeah i thought about that before but my guess was on what james told me to do. I'll need to look again hopefully to find something.
#16 Posted 25 February 2017 - 11:03 AM
thing. These hover or flying cars need to hit the player if you are being close to them. Does anybody know
wich part of the code you need to make this work. I only need this and after this hopefully the little project is done.
#17 Posted 25 February 2017 - 09:03 PM
darkcaleb, on 25 February 2017 - 11:03 AM, said:
thing. These hover or flying cars need to hit the player if you are being close to them. Does anybody know
wich part of the code you need to make this work. I only need this and after this hopefully the little project is done.
You could try copying the code that the bosses use to kill the player if he gets too close. But you will want to set the half-submerged (128) flag on the car cstat in that case, if it isn't set already. That's because ifpdistl is based on distance from the base of the sprite/model, so using it without that flag will result in the bottom and a little below the car being deadly and the upper half not.
#18 Posted 26 February 2017 - 05:45 AM
Trooper Dan, on 25 February 2017 - 09:03 PM, said:
Well i tried but not getting any results back. This pretty much the code i have gotten from James:
//
// ------------------------------------------------------------
// IW HOVERTRAIN SPAWNER
// ------------------------------------------------------------
//
action HOVERT 0 1 1 1 1
move HOVERTMOVE 1500 0
useractor notenemy 5607
sizeat 70 70
action HOVERT
move HOVERTMOVE geth
ifnotmoving killit
enda
useractor notenemy 5608
cstat 32768
ifcount 600
{
ifrnd 4
{
espawn 5607
ifrnd 96 setactor[RETURN].pal 21
else ifrnd 96 setactor[RETURN].pal 11
resetcount
}
}
enda
This is meant for a train that needs to hit the player and killing him in the proces. Btw i'm still learning con coding but it's going very slow so
#19 Posted 26 February 2017 - 11:18 AM
action HOVERT 0 1 1 1 1 move HOVERTMOVE 1500 0 useractor notenemy 5607 sizeat 70 70 action HOVERT move HOVERTMOVE geth ifnotmoving killit enda
I'm trying to figure out why it even moves at all, because you are constantly setting it to "move HOVERTMOVE geth", which should be resetting its velocity every tic. I will guess that it moves much more slowly than 1500 as a result; if not, just raise that number back up.
action HOVERT 0 1 1 1 1 move HOVERTMOVE 1000 useractor notenemy 5607 ifmove 0 { sizeat 70 70 cstator 128 action HOVERT move HOVERTMOVE geth } ifnotmoving killit ifp palive ifpdistl 1280 { addphealth -1000 sound SQUISHED palfrom 63 63 } enda
When you use this code, you will want to raise the spawns a few pageups higher in the map, becuase the cars will appear to be lower, as I explained in my previous post.
#20 Posted 26 February 2017 - 01:28 PM
Trooper Dan, on 26 February 2017 - 11:18 AM, said:
action HOVERT 0 1 1 1 1 move HOVERTMOVE 1500 0 useractor notenemy 5607 sizeat 70 70 action HOVERT move HOVERTMOVE geth ifnotmoving killit enda
I'm trying to figure out why it even moves at all, because you are constantly setting it to "move HOVERTMOVE geth", which should be resetting its velocity every tic. I will guess that it moves much more slowly than 1500 as a result; if not, just raise that number back up.
action HOVERT 0 1 1 1 1 move HOVERTMOVE 1000 useractor notenemy 5607 ifmove 0 { sizeat 70 70 cstator 128 action HOVERT move HOVERTMOVE geth } ifnotmoving killit ifp palive ifpdistl 1280 { addphealth -1000 sound SQUISHED palfrom 63 63 } enda
When you use this code, you will want to raise the spawns a few pageups higher in the map, becuase the cars will appear to be lower, as I explained in my previous post.
Hey thanx! Still a problem with getting it fuctional, and getting error in the eduke32.txt
Compiling: GAME.CON (151236 bytes)
Including: DEFS.CON (36779 bytes)
Including: USER.CON (46766 bytes)
Including: HOVERCAR.CON (834 bytes)
Including: HOVERTRAIN.CON (450 bytes)
GAME.CON: In actor `ORGANTIC':
GAME.CON:3969: warning: found `else' with no `if'.
GAME.CON: In state `pigshootenemystate':
GAME.CON:5892: warning: found `else' with no `if'.
Found 2 warning(s), 0 error(s).
Just to give a insite of what is inside the project. The code I send ya was a copy of the original with a few tweaks.(Check the file)
This has a purpose for a train that comes back around every 20 sec maybe. So you have hovercars and a hovertrain. I used the almost the same method as the AMC mod.
O yeah just to let you know if it's possible to have a sound attached to the train when it come around? That is pretty much it.
Attached File(s)
-
HOVERCAR.CON (834bytes)
Number of downloads: 106
This post has been edited by darkcaleb: 26 February 2017 - 01:30 PM
#21 Posted 26 February 2017 - 01:37 PM
#22 Posted 26 February 2017 - 03:26 PM
Trooper Dan, on 26 February 2017 - 01:37 PM, said:
Done and fixed the con and it worked! Thanx allot Just one last thing if it possible because i think i'm almost done here with the project. Where do i put a sound for the train so can hear it coming? Maybe this little project will be done somewhere this upcoming week!