Scripting updates
Moderator: Moderators
In OTA there was HitByWeapon(x,z), but sadly the arguments were normalised to 400, so it could be used to get only the angle, not the radius.
So yes, a OnHit(piecename,xz,y,heading,pitch) function would be nice.
Also, would it be possible for script variable not be be limited to 32bits signed integers? I'd like to be able to use long floats, and character strings. With all the accompagning string function. It would open lots of possibilies, things like: if(get UNIT_TYPE(unit_id)=="ARMCOM")
So yes, a OnHit(piecename,xz,y,heading,pitch) function would be nice.
Also, would it be possible for script variable not be be limited to 32bits signed integers? I'd like to be able to use long floats, and character strings. With all the accompagning string function. It would open lots of possibilies, things like: if(get UNIT_TYPE(unit_id)=="ARMCOM")
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
- GrOuNd_ZeRo
- Posts: 1370
- Joined: 30 Apr 2005, 01:10
Setting values of arbitrary fbi-tags might be something for the future, but not now. It would be powerful, but it is not simple to implement. It would among other things require a rewrite of most of the parsing since we don't just save the propertynames as strings and use their values, there's a lot of parsing done at loadtime. It would also require new script compilers. A better idea for now would probably be to expose some of the more useful values to change through the existing get/set interface.
In general, I don't think we will do any changes which would require updating the syntax of the language and require a new compiler at this time, it will have to wait until it's decided if we should switch to a new scripting language and if so which one for the updated unit format.
Supporting some of the ta:k stuff could be done though I guess, at least if I can find some documentation on what is changed. :)
In general, I don't think we will do any changes which would require updating the syntax of the language and require a new compiler at this time, it will have to wait until it's decided if we should switch to a new scripting language and if so which one for the updated unit format.
Supporting some of the ta:k stuff could be done though I guess, at least if I can find some documentation on what is changed. :)
- PauloMorfeo
- Posts: 2004
- Joined: 15 Dec 2004, 20:53
I'm not sure if this is part of scripting or of the model...
http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2149
The possibility for buildings to be built either in land, under water and water surface.
That way, we would only need one metal extractor for land and for under water. Only one radar for land and for water surface. Only one hovercraft plant. Et Cetera.
Maybe they could be made to cost extra if built in water and have, for example, sunking animations if on water.
http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2149
The possibility for buildings to be built either in land, under water and water surface.
That way, we would only need one metal extractor for land and for under water. Only one radar for land and for water surface. Only one hovercraft plant. Et Cetera.
Maybe they could be made to cost extra if built in water and have, for example, sunking animations if on water.
I had the same idea, building having the same buildpics, and when you place them, the engine will determine wich one to place.PauloMorfeo wrote:I'm not sure if this is part of scripting or of the model...
http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2149
The possibility for buildings to be built either in land, under water and water surface.
That way, we would only need one metal extractor for land and for under water. Only one radar for land and for water surface. Only one hovercraft plant. Et Cetera.
Maybe they could be made to cost extra if built in water and have, for example, sunking animations if on water.
But..how knowing if you want an unterwater metal convertisser, or one on the top of water?
Sorry for not being an unit maker.zwzsg wrote:In TA the same building can be made buildeable underwater and on land. Land and floating wasn't possible however. Oh and in Spring too, I made building buildeable both underwater and on land without any problem. So don't ask for something that's already supported.
And thus, even if it's supported, I ask about being used...good or bad idea?
- PauloMorfeo
- Posts: 2004
- Joined: 15 Dec 2004, 20:53
That wouldn't hapen. (at least not acording to what i said.)Torrasque wrote:...
But..how knowing if you want an unterwater metal convertisser, or one on the top of water?
For example, the metal extractor is always on the floor.
The metal maker, would have to check if it was on water or on land. On water it is on top of the water, too, but has that sunking animation, so the check.
No? Why not? I most certainly do not know every single feature already existant and, so, i do not know if it is already there or not. Then i wouldn't ask for anothing at all.zwzsg wrote:...
So don't ask for something that's already supported.
Last edited by PauloMorfeo on 08 Sep 2005, 15:51, edited 1 time in total.
- PauloMorfeo
- Posts: 2004
- Joined: 15 Dec 2004, 20:53
I think that the units could have description for the diferent orders menus.
For example, there could be these 5 as a basic standard:
- Orders
- Factories
- Resources
- Defensive Structures
- General Structures
When shifting with the arrows, we would start at the orders menu and circle through them.
So we could add orders to the orders menus but have them organized.
We would also be able to create other menus like the menu "Alien Technology", "Research", "Spells" to suit our needs.
If something unclear, ask me to explain further.
For example, there could be these 5 as a basic standard:
- Orders
- Factories
- Resources
- Defensive Structures
- General Structures
When shifting with the arrows, we would start at the orders menu and circle through them.
So we could add orders to the orders menus but have them organized.
We would also be able to create other menus like the menu "Alien Technology", "Research", "Spells" to suit our needs.
If something unclear, ask me to explain further.
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
- GrOuNd_ZeRo
- Posts: 1370
- Joined: 30 Apr 2005, 01:10
PauloMorfeo, you inspired me.
Maybe if you try to build a mex on water, spring will determine what you are trying and build an UW mex instead.
Perhaps the same can be done if you attempt to build a radar tower, it will build a floating one instead, the only problem here will be that there will have to be a seperate unit for every possibility I.E. wind gen for land, sea...
it might get confusing...
Another thing that is worth considdering is this:
This is more like PauloMorfeo's suggestion, when you build a windgen on water, the script knows the unit is being build on water and pontoons normally being hidden on the ground, will be drawn on water, so we only need an extra model inside the windgen model.
in this way we could easilly remove many unnecesary units such as the floating defenders and such.
as for mexes, we could do the same, the only problem I see is the build picture which will be a regular mex instead of the UW one.
Maybe if you try to build a mex on water, spring will determine what you are trying and build an UW mex instead.
Perhaps the same can be done if you attempt to build a radar tower, it will build a floating one instead, the only problem here will be that there will have to be a seperate unit for every possibility I.E. wind gen for land, sea...
it might get confusing...
Another thing that is worth considdering is this:
This is more like PauloMorfeo's suggestion, when you build a windgen on water, the script knows the unit is being build on water and pontoons normally being hidden on the ground, will be drawn on water, so we only need an extra model inside the windgen model.
in this way we could easilly remove many unnecesary units such as the floating defenders and such.
as for mexes, we could do the same, the only problem I see is the build picture which will be a regular mex instead of the UW one.
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
The ability for units to know when and what they are transporting: OnTransporting(unitname), and to tell what they are being transported by: OnGetTransport(unitname). Very useful for WD when APCs need to have a gunner or infantry bloke loaded to fire its mounted machine gun, or where units can run out of ammo and have to load them selves into an ammo-dispencing unit / building to get more ammo.
Also, the ability to change how much energy / metal the unit is using / making, maybe something like this: energy = +10 or something
Also, the ability to change how much energy / metal the unit is using / making, maybe something like this: energy = +10 or something
- Tim Blokdijk
- Posts: 1242
- Joined: 29 May 2005, 11:18
Suggestion:
Allow scripting (not hard coded) that can help a unit to think for itself.
Like planes returning to a air repair pad.
Unit's to collect ammo.
A stealth unit to avoid los detection.
A zombie unit to randomly walk over the map destroying whatever it finds.
A construction unit capable to construct a fully functional base on it's own.
Maybe code can be used from the AI subsystem?
Allow scripting (not hard coded) that can help a unit to think for itself.
Like planes returning to a air repair pad.
Unit's to collect ammo.
A stealth unit to avoid los detection.
A zombie unit to randomly walk over the map destroying whatever it finds.
A construction unit capable to construct a fully functional base on it's own.
Maybe code can be used from the AI subsystem?
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07