Get player by name
#10
That's not good enough, mouse hover is not a good interface (especially if you have to hover over multiple things). On the other hand, most parameters don't need this kind of info, they are self-explanatory.

How about listing one parameter per line, and add an optional type after, say, a colon?
Code:
DamageType: [eDamageType]
AttackerEntity: [cEntity]
RawDamage
KnockbackAmount: number
(Things in [brackets] are links to respective pages)
For this to work, we could extend the APIDesc format for the "Params" - if it's a simple string, use the current behavior, if it is an array, consider each item a separate parameter and each item should have up to three member strings: name, typename, typelink:
TakeDamage =
{
	{ Params = "{{AttackerEntity|cEntity}}", Return = "", Notes = "Causes this entity to take damage that AttackerEntity would inflict. Includes their weapon and this entity\'s armor." },
	{
		Params = {
			{"DamageType", "eDamageType", "Globals#eDamageType"},
			{"AttackerEntity", "cEntity"},
			{"RawDamage"},
			{"KnockbackAmount", "number"}, 
		},
		Return = "",
		Notes = "Causes this entity to take damage of the specified type, from the specified attacker (may be nil). The final damage is calculated from RawDamage using the currently equipped armor."
	},
	...
},
We could even do the same for the return values - sometimes there's more of them and of various types.
Reply
Thanks given by:


Messages In This Thread
Get player by name - by JuliB - 01-08-2016, 02:40 AM
RE: Get player by name - by NiLSPACE - 01-08-2016, 02:48 AM
RE: Get player by name - by JuliB - 01-08-2016, 03:06 AM
RE: Get player by name - by NiLSPACE - 01-08-2016, 03:13 AM
RE: Get player by name - by JuliB - 01-08-2016, 03:25 AM
RE: Get player by name - by NiLSPACE - 01-08-2016, 03:35 AM
RE: Get player by name - by JuliB - 01-08-2016, 03:50 AM
RE: Get player by name - by xoft - 01-08-2016, 07:55 AM
RE: Get player by name - by NiLSPACE - 01-08-2016, 05:45 PM
RE: Get player by name - by xoft - 01-08-2016, 11:44 PM
RE: Get player by name - by NiLSPACE - 01-09-2016, 12:03 AM



Users browsing this thread: 1 Guest(s)