Mobile Mex (revisited)

Mobile Mex (revisited)

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderators: Moderators, Moderators

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Mobile Mex (revisited)

Post by knorke »

PicassoCT wrote:so that a unit standing automorphs into a mex, and retour?
jK has already done mobile mexes with a gadget years go.
Did not test it but looks nice and customizeable.
But is also somewhat complicated (for new bees)

So this is a really simple version via a unit script:
When the unit stops moving, a mex is created at the position of the unit.
When the unit starts moving again, the mex is destroyed.
Image

You need 2 units:
1) the mobile unit (like a mining vehicle or whatever, i chose flash.)
2) a mex unit (pro tip: unlike me, use an invisible model, this is just for better demonstration)

script:

Code: Select all

local mexID = -666
function script.Create()
	Spring.Echo ("mobile mex here!")
end

function script.Killed(recentDamage, maxHealth)
	killMex()
end

function script.StartMoving()	
	killMex()
end

function script.StopMoving()	
	makeMex()
end

function makeMex ()
	local x,y,z=Spring.GetUnitPosition (unitID)
	local teamID = Spring.GetUnitTeam (unitID)
	mexID = Spring.CreateUnit("armmex", x, y, z, 0, teamID)		--replace with your mex name
	if (Spring.ValidUnitID (mexID)) then
		Spring.SetUnitNoSelect (mexID, true)
	else
	Spring.Echo ("error! CreateUnit failed for the mobile mex")
	end
end

function killMex()
	if (Spring.ValidUnitID (mexID)) then
		Spring.DestroyUnit (mexID, false,true) --leave no wreck
	end
end
There are probally some things that require extra attention but this is kept simple on purpose.

pro tip: some mods (ba, xta) do not have a unit_script.lua so it will not work there. Just copy it in to get lua unit scripts working.
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10279
Joined: 24 Jan 2006, 21:12

Re: Mobile Mex (revisited)

Post by PicassoCT »

knorke wrote: (for new bees)

thx knorke. also functions always so that they are exist before they are called ;)
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Mobile Mex (revisited)

Post by knorke »

also functions always so that they are exist before they are called
this works because there is no "local" in front of the functions which makes them global. (works everywhere)
0 x

User avatar
Beherith
Moderator
Posts: 4934
Joined: 26 Oct 2007, 16:21

Re: Mobile Mex (revisited)

Post by Beherith »

Cool stuff!
0 x

User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: Mobile Mex (revisited)

Post by 1v0ry_k1ng »

would it be hard to make it remember HP % between transitions? oh maaan, If only EE was still in development this would be mega
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Mobile Mex (revisited)

Post by knorke »

1v0ry_k1ng wrote:would it be hard to make it remember HP % between transitions?
it does not transit/morph.
the original unit is never removed (like with morphing in ie zK) as so it keeps its HP.
Instead, an invisible mex (in the gif it is visible for better visibility) is spawned on the flash. The small white thing on the mex is the flash chasis poking through the mex model.
In a real game the mex would not be visible at all.

tl;dr: it keeps HP
oh maaan, If only EE was still in development this would be mega
The thing is that 99% of what are "recent advances" was most likely already possible when EE was around.. :?
0 x

User avatar
Wombat
Posts: 3379
Joined: 15 Dec 2008, 15:53

Re: Mobile Mex (revisited)

Post by Wombat »

dark colony much <3
0 x

User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: Mobile Mex (revisited)

Post by 1v0ry_k1ng »

knorke wrote:
oh maaan, If only EE was still in development this would be mega
The thing is that 99% of what are "recent advances" was most likely already possible when EE was around.. :?
well, the plans for the NI- mobile mexes and then mex that was also a nanotower were both apparently impossible at the time
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: Mobile Mex (revisited)

Post by smoth »

fang probably will not come back to EE. The community acted like assholes and you guys seriously underestimate the amount of effort that goes into the spring games. Why would he come back and bust his ass, learn lua etc just to get a bunch of shit? there is no reason to. Don't pretend it didn't happen, it did and he didn't deserve it.

Very cool of you knorke, do you roll a dice to decide what ideas you try to do or do you wait for the sanguine moon to whisper it into your dreams?
0 x

User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: Mobile Mex (revisited)

Post by 1v0ry_k1ng »

smoth wrote:fang probably will not come back to EE. The community acted like assholes and you guys seriously underestimate the amount of effort that goes into the spring games. Why would he come back and bust his ass, learn lua etc just to get a bunch of shit? there is no reason to. Don't pretend it didn't happen, it did and he didn't deserve it.
Truth be told, he made some very unpopular and unsuccessful design decisions post 0.163 (namely, the move to 'epic scale' that combined with a weak icon scheme made the game semi-unplayable and visually unappealing) that alienated many players and generated alot of the negative feedback. He made one of the best spring mods to date, but he also had had trouble dealing with even constructive critisism.
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: Mobile Mex (revisited)

Post by smoth »

That is you opinion sure. But it was really a handful of people who disliked it.

The asshole behavior of this community has nothing to do with rejecting eee and everything to do with the competitive nature of people here and their insistence that the be decision makers when they want to do little to no work
0 x

User avatar
AF
AI Developer
Posts: 20671
Joined: 14 Sep 2004, 11:32

Re: Mobile Mex (revisited)

Post by AF »

You cant say Fang was a Saintly man when it came to taking criticism, for example for quite a while he denied and derided anybody who muttered the existence of the problem as an annoyance/troll. It wasn't till later when pretty much everyone said it was an issue that he took it seriously.

Once he did though, he listened, which is more than can be said of some people here. He just wanted the problem to go away, and the means of fixing it wasn't available/mature at the time, and by the time it was seriously contemplated, the snowball of frustration had grown too large for him to handle.

( and you wonder why I stress the importance of usability? It's not just some whimsical design thing, in this case it made the game unplayable for a significant number of people and was a major handicap that lead to the eventual death of the project. These things matter, and more often than not they're trivial 5 second changes, low hanging fruit if any there was any. ) .

If it had happened today, someone would've invoked some lua trickery and we'd all soon forget about it. A modified unit shapes widget anyone?
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: Mobile Mex (revisited)

Post by smoth »

you are no better. notice I didn't give some lecture on how fang should have acted. It is how we have all acted, I am no better either but I don't pretend to be above raging. just saying.. you do it to and don't directly deal with players like fang or I have had to.
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: Mobile Mex (revisited)

Post by smoth »

AF wrote:It wasn't till later when pretty much everyone said it was an issue that he took it seriously.
also this shit.. really..

"SHIT SUX"
"IMBA BAAAAAAAW"

common player complaints. Many developers on moddb don't listen to the first 2 weeks of bitching outright. JUST BECAUSE players many times HAVE NO CLUE what they are talking about. They have to adjust to change and people hate change.

EEE came out the door and people raged about it, MANY of which were seldom on the servers.. they didn't give it a shot and when they did try it they only focused on proving their point. In this community that is a game in the game, to try and then see if they can "WIN" by making devs revert. Fact of the matter is that if a person cries IMBA you cannot drop everything and adjust. You need to give it time to look over all of the things that are effected. Some players have logical requests and those after discussion can be worked into something actually meaningful... but to act like a game developer should jump every time someone cries IMBA or DO NOT WANT.. no I am sorry not happening with ANY sensible dev.

if it was that easy, BA would be done.
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Mobile Mex (revisited)

Post by knorke »

Image
---
1v0ry_k1ng wrote:well, the plans for the NI- mobile mexes and then mex that was also a nanotower were both apparently impossible at the time
E&E 0.42 is from 2008, jK's thread is from 2007
Just from the tech available at the time it would have been possible.
The nanotower+mex combo too.
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10279
Joined: 24 Jan 2006, 21:12

Re: Mobile Mex (revisited)

Post by PicassoCT »

smoth wrote:fang probably will not come back to EE. The community acted like assholes and you guys seriously underestimate the amount of effort that goes into the spring games. Why would he come back and bust his ass, learn lua etc just to get a bunch of shit? there is no reason to. Don't pretend it didn't happen, it did and he didn't deserve it.

Very cool of you knorke, do you roll a dice to decide what ideas you try to do or do you wait for the sanguine moon to whisper it into your dreams?
He did that to help me, and im very gratefull.
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: Mobile Mex (revisited)

Post by smoth »

Yeah he mentioned that at the top of the thread :p was just curious what motivates him to help projects :)
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10279
Joined: 24 Jan 2006, 21:12

Re: Mobile Mex (revisited)

Post by PicassoCT »

ahem..mmh.. let me think, he is beeing the same sort of nice guy lieke... you? Dont forget you did that Journeywarlogo, i still have your watermark on it ;)


Also i pay his hookerbillz..

Nah, srsly knorke helped everyone, he worked with CT, he betatested micronwarz, and various other. And liek you smoth, he disses people by never asking for a favour in return.

Goes liek this: "Oh, not a thing, glad to help (but keep your newbees hands away from my mod)!"

;)
0 x

User avatar
Lord Juzza
Posts: 60
Joined: 20 Jan 2009, 11:50

Re: Mobile Mex (revisited)

Post by Lord Juzza »

Back to original topic of this thread, I think this could be used in a cool way, having units that say 'deploy' after a period of time and change units into a non mobile version of the same unit which extracts metal. However it can only attack with it's 'super weapon' for lack of a better word, while extracting metal like the exploiter mexes work.

Another idea would be a huge Drill kbot that when deployed into a mex extracts metal and looks as if it's drilling into the mex spot, there would need to be a reason why these would exist, they might be tougher then Mohos or be a funny 1.5 version of a mex. Either way this is a cool contribution to the spring community, thank you.
0 x

User avatar
hoijui
Former Engine Dev
Posts: 4342
Joined: 22 Sep 2007, 09:51

Re: Mobile Mex (revisited)

Post by hoijui »

ahh.. this juzza thread gave me idea:
when unit deploys, it drills it pops out a huge gun that shoots dirt.
when the dirt lands, it terraforms the map there, making it a bit higher. as it has to drill down, it sacks into the ground deeper and deeper. so you can block incomming units on sight, or you can let it auto-patrol shoot in a circle around itsself on max range, to create a terraform fortress, or just to kill enemy CPUs through path-finder updating cycles.
0 x

Post Reply

Return to “Game Development”