Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
forgott to say you have to define the piece also. like in your .s3o file, the model pieces have names (strings) but the script uses piece numbers. So you could do something like this:
Code:
function script.QueryWeapon1() return 0 end
and just guess if you need to put 0, 1,2 or 3 to make it shot from the correct piece. But that would be stupid of course. Instead there is a way to convert piece names to numbers and store them in a variable, works like this:
Code:
piecer_number = piece "piece_name"
ie
Code:
popper = piece "popper" function script.QueryWeapon1() return popper end
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
smoth wrote:
Isn't rifle a hit cast? What's bad aboot it eh?
cast to what? ie the appearently hardcoded default effects are bad imo https://github.com/spring/spring/blob/master/rts/Sim/Weapons/Rifle.cpp -------- -scaled up scout.s3o by factor 6 so you can actually see it -added a alpha channel to scout.tga so you get black wheels but a colored body (teamcolor_tempfile.bmp is just a temp file i used but maybe helpful to look at.) -fixed origins of ie wheels so they rotate around their center -made a scoutscript.lua that shouts, spins wheels, explodes -tried to made a scout2 that only shoots forward but did not manage right now. it is def. possible though. -made unit/target categories so, that untis can shot each other
the effects from the weapon are strange rectangles instead of looking nice. iirc it is because you need to include or link to some textures.
you still need a armordefs.lua to make weapons deal correct damage
It wouldn't surprise me if some of the issues regarding correct 'turn to face target for non turret weapons' behaviour went away with a more regularly used weapontype.
Thanks a lot, knorke. The reason I had rifle on is because it is an instant hit. I read that it's bad, but the original scout had an instant hit. Wasn't quite sure on changing this part or not.
Anyway, I'm going to be adding in the factory next. With building units from factories, do you pick a piece of the model for it to spawn at in the script? Just like choosing which model part shoots?
And one more thing, the cannon archs. I change that by switching the trajectory, I take it?
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
Quote:
With building units from factories, do you pick a piece of the model for it to spawn at in the script? Just like choosing which model part shoots?
yes. for factories there is one function that returns the piece at which at the unit will be build. (can also move/spin that piece and the unit will follow, spinning only seems to work around y axis unless you use some tricks) and a second funcion returns a piece where a nano particle is created. dont know if that is needed actually. see the wiki links or example game for more info.
instant hit weapons: you could use a fast cannon projectile or a laser maybe. or if it works for you, then use the rifle type.
Quote:
And one more thing, the cannon archs. I change that by switching the trajectory, I take it?
dont know from head what tags you have to change to make a flatter trajectory. maybe just higher weaponVelocity will work. sadly there is no nice list of weapon related tags yet.
for factories there is one function that returns the piece at which at the unit will be build. (can also move/spin that piece and the unit will follow, spinning only seems to work around y axis unless you use some tricks) and a second funcion returns a piece where a nano particle is created. dont know if that is needed actually. see the wiki links or example game for more info.
I'll check the example game.
Quote:
sadly there is no nice list of weapon related tags yet.
...one more problem . Probably my (almost) last problem with units, since I still never got a building working properly. Spring refuses to recognize my building. My code inside of the units folder:
Sorry about all the problems, first time with a spring game, and no tutorial has properly discussed any of these problems. Not one that I know of at least. Thanks again. =P
Difference between (mobile) unit and building is mainly that buildings have a yardmap. (the grid footprint thing you see when placing it)
YardMap ="ooooo occco occco occco occco", read like this: ooooo occco occco occco occco o = "wall" c ="open/closes when factory builds something" so this factory has a U-shaped footprint.
Also buildings have no MovementClass because well, they do not move. Oh, and needs Builder = true, instead of Builder = 0, for a factory. And a buildoptions list what the builder can build.
just use the linked file and replace the names for unit/.s3o file/script etc
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
Quote:
wiredforwar.org
omg that page sorry to say but do not have good memories of that. I LOVED Machines and found that site when searching for patch/crack/cd image some years ago, so mp games would be easier to set up. well, it said you needed X amount of postings to acess the downloads so I did not even bother with registering and looked elsewhere. Still pissed me off massively at the time. By then there were already threads about making "Machines 2" It seems the only stuff that happend since then is lots of dream postings and maybe some 3d models. No offense, but unless there is some secret site nobody in that forum did anything for 5 years. What kind of "team" is that? Someone seriously proposed to use "the Steam Engine" while others ask if there are "Visual C++ programmers" around. "Or maybe dark basic should be used?" Sadly one guy could not help because his excel does not work. Oo
I can tell this is fail from having seen quite some fail in my time and often contributing to it.
Anyway, do not get disattracted with all that, as you see it produced little results in the last years. Concentrate on learning scripting, modeling and try to get 3,4 working units ingame. Then, if multiple people start to contribute content (not ideas), set up an SVN. ----------- from that infolog:
Quote:
[f=0000000] Loading unit script: scripts/lifscript.lua [f=0000000] Failed to load: lifscript.lua ([string "scripts/lifscript.lua"]:1: '<name>' expected near '=')
some synthax error in the factory script in line 1. might look at it later but maybe you can figure it out yourself too.
Quote:
[f=0000000] [CCEG::Load] WARNING: table for CEG "redsmoke" invalid (parse errors?)
remove the redsmoke effect tag thing from the unitdef. not sure if missing effects stop the unit from being loaded but worth a try.
This isn't Machines 2. It's a remake. Those posts are very old. The guy with no excel was me, and the grow plan wasn't a grow plan for the game. Anyway, It's a separate project and we started on like august 6th. If you see a random guy with 1 post randomly suggesting an engine, it's not our team.
I have libre office anyway. The forums do look like a joke now, but we do have a team.
EDIT: There is also a development tab on the first page that showed some early progress on this engine. We're mainly using an irc.
Protip brosef don't turn down free help because " you have a team," ever.
I probably shouldn't, but the modellers right now make models that look similar to each other. If he wants to help with something else, he could, but I really don't need a modeller right now.
Also, If you need the machines discs, you can let me know. We have them working on xp, vista, and windows 7.
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum