Sat September 20 2003, 05:49 PM
DanteSpeak slowly and gently to a newb, please.
on and off, i've been puzzling out the vocab and punctuation of uscript coding, but mainly from the minimal experience of having dabbled in the rpg Neverwinter Night's toolset. some major differences and obstacles, especially to one who can only cut n paste. (that toolset provided an on-the-fly help and diction resource)
question: is "!=" simply a negation? or how does it work? when must "==" be employed over "="? the pattern has eluded me.
thanks for any help rendered.
Sat September 20 2003, 06:12 PM
Unter den UebrigenTo answer your question, Dant': != and == are so-called "
operators of comparison" (see Built-in operators). They are useful in the comparison of x to y (negative and affirmative respectively); and are to be distinguished from so-called "operators of assignment", i.e. =, where the value of y is assigned to x.
Operators of comparison are a prompt for conditional action, whereas operators of assignment are a positive declaration. Therefore:
if (bShepherdOfWives == true) { // Condition
iAnnuaryHaremBudget = 40000; // Declaration
}
Sat September 20 2003, 06:14 PM
Dantethanks for the clarification.
so these operators would be shortcuts from laboriously setting up 'if...{}{}...else{}{}, etc', which was something that struck me in neverwinter nights.
Sat September 20 2003, 06:15 PM
Unter den UebrigenOriginally posted by Dante:
so these operators would be shortcuts from laboriously setting up 'if...{}{}...else{}{}, etc'
Do you mean the operators of condition, assignment; or generally?
Sat September 20 2003, 06:18 PM
Dantei referred to comparison types, but now i just realised that these if-else clauses shouldn't be neglected.
and that site is quite informative and structured. previously i was revisitng the basic nwn (neverwinter nights) tutorials.
many thanks, i shall continue with the fumbling and groping. horrors of maths pleasantly resurrected, actually.
Sat September 20 2003, 06:25 PM
Unter den UebrigenOriginally posted by Dante:
i referred to comparison types, but now i just realised that tese shouldn't be neglected.
Exactly;
cannot be neglected, perhaps. Neverwinter Nights appears to use a slightly stricter "C++" notation, but the fundamentals are similar.
Sat September 20 2003, 06:37 PM
Dantehave been also checking out the headball coding: much of it seems ceremonial, ie more concerned with the scoreboard, sounds and messages.
if(bRestoreHealth)
{
Scorer.Health = Scorer.MaxHealth;
// Restore body parts
if(Scorer.BodyPartMissing(BODYPART_LARM1))
Scorer.RestoreBodyPart(BODYPART_LARM1);
if(Scorer.BodyPartMissing(BODYPART_RARM1))
Scorer.RestoreBodyPart(BODYPART_RARM1);
// Restore health of bodyparts (must be after restoring limbs)
for(i = 0; i < NUM_BODYPARTS; i++)
Scorer.BodyPartHealth[i] = Scorer.Default.BodyPartHealth[i];
}
this bit suggests to me that you can assign value of regeneration on scoring. might this be hybridised with the code for 'use/eat' of an object (head, limb) to create the effect of ingesting a severed limb or head to heal? and other effects such as speed or defence.
[add] still very much in the cut n paste mindset. i'll get back to you on this.
Sun September 21 2003, 12:56 AM
Unter den UebrigenOriginally posted by Dante:
might this be hybridised with the code for 'use/eat' of an object (head, limb) to create the effect of ingesting a severed limb or head to heal?
Essentially; we used a similar technique with ReGen on Low Caliber for the so-called "depressive" health: each subsequent frag would refresh your health, but also decrease total health by about ten points. Too much carnage would literally kill you; lol.
Sun September 21 2003, 01:27 AM
Danteemulation of nature: praying mantis (carnage and procreation as double-edged).
or in effect, too much rune (including but not limited to, of spoils) usage might kill you?