Low Caliber Club
Low Caliber Club
    Low Caliber Forum  Hop To Forum Categories  Work in Progress    Speak slowly and gently to a newb, please.

Moderators: Impaler, Mr_Fister
Go
New
Find
Notify
Tools
Reply
  
Speak slowly and gently to a newb, please.
 Login/Join
 
Emeritus
Picture of Dante
posted
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.

 
Posts: 1258 | Location: "Auslander" | Registered: Wed May 21 2003Reply With QuoteReport This Post
Treasurer
Picture of Unter den Uebrigen
posted Hide Post
To 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
}
 
Posts: 1457 | Location: Altadena | Registered: Tue January 07 2003Reply With QuoteReport This Post
Emeritus
Picture of Dante
posted Hide Post
thanks 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.
 
Posts: 1258 | Location: "Auslander" | Registered: Wed May 21 2003Reply With QuoteReport This Post
Treasurer
Picture of Unter den Uebrigen
posted Hide Post
Originally 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?
 
Posts: 1457 | Location: Altadena | Registered: Tue January 07 2003Reply With QuoteReport This Post
Emeritus
Picture of Dante
posted Hide Post
i 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.

 
Posts: 1258 | Location: "Auslander" | Registered: Wed May 21 2003Reply With QuoteReport This Post
Treasurer
Picture of Unter den Uebrigen
posted Hide Post
Originally 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.
 
Posts: 1457 | Location: Altadena | Registered: Tue January 07 2003Reply With QuoteReport This Post
Emeritus
Picture of Dante
posted Hide Post
have 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.

 
Posts: 1258 | Location: "Auslander" | Registered: Wed May 21 2003Reply With QuoteReport This Post
Treasurer
Picture of Unter den Uebrigen
posted Hide Post
Originally 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.
 
Posts: 1457 | Location: Altadena | Registered: Tue January 07 2003Reply With QuoteReport This Post
Emeritus
Picture of Dante
posted Hide Post
emulation 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?
 
Posts: 1258 | Location: "Auslander" | Registered: Wed May 21 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

    Low Caliber Forum  Hop To Forum Categories  Work in Progress    Speak slowly and gently to a newb, please.

© Low Caliber Club 2002-4
Gallery | Chat | Archive | Tutorials | Red Carpet

Constitution

Members

Forum

Stats

Wiki